
![]() |
|

Information |
| Title | checkwidth validation is not calculated correctly with multibyte characters |
|---|
| URL Name | checkwidth-response-wrong-with-multi-byte-characters |
|---|
| Article Number | 000185886 |
|---|
| Environment | Product: OpenEdge
Version: 11.4, 11.5, 11.6, 11.7 to 11.7.10, 12.0, 12.1, 12.2 to 12.2.5, 12.3 OS: All supported platforms |
|---|
| Question/Problem Description |
|
|---|
| Steps to Reproduce | The following test uses the Euro symbol which is 3 bytes long.
Integer value for the Euro symbol in UTF-8 is 14844588. 1. In a UTF-8 database, create a new table (test) with a single CHARACTER field (chkwdth) with format "x(10)"; default MAX-WIDTH setting for the field will be 20. ADD FIELD "chkwdth" OF "test" AS character DESCRIPTION "what width" FORMAT "X(10)" INITIAL "" LABEL "test field width" LABEL-SA "L28" POSITION 4 MAX-WIDTH 20 VIEW-AS "VIEW-AS FILL-IN NATIVE SIZE 12 BY .9" COLUMN-LABEL "From!UTF8!code" COLUMN-LABEL-SA "L16" HELP "_field._width" ORDER 20 2. Connect to the database with Procedure Editor using parameters: -cpinternal UTF-8 -cpstream UTF-8 -checkwidth 2 3. Run the following code: CREATE test. ASSIGN chkwdth = FILL(CHR(14844588), 10). Error 10841 will occur. Insertion succeeds if the FILL amount is reduced to 6 (3 x 6 = 18) since the SQL width of the field is 20. |
|---|
| Clarifying Information |
|
|---|
| Error Message | WARNING: Width of data is greater than <table.field> (rowid <rowid>) _width. (10840)
ERROR: Width of data is greater than <table.field> (rowid <rowid>) _width. (10841) |
|---|
| Defect Number | Defect PSC00348404 / OCTA-3391 |
|---|
| Enhancement Number |
|---|
| Cause |
|
|---|
| Resolution |
|
|---|
| Workaround |
|---|
| Keyword Phrase |
|---|
| Last Modified Date | 7/8/2021 12:29 PM |
|---|