forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita5be6e9
committed
Fix comments that claimed that mblen() only looks at first byte.
GB18030's mblen() function looks at the first and the second byte of themultibyte character, to determine its length. copy.c had made theassumption that mblen() only looks at the first byte, but it turns out towork out fine, because of the way the GB18030 encoding works. COPY willsee a 4-byte encoded character as two 2-byte encoded characters, which isenough for COPY's purposes. It cannot mix those up with delimiter orescaping characters, because only single-byte ASCII characters aresupported as delimiters or escape characters.Discussion:https://www.postgresql.org/message-id/7704d099-9643-2a55-fb0e-becd64400dcb%40iki.fi1 parent7c079d7 commita5be6e9
2 files changed
+31
-8
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4121 | 4121 |
| |
4122 | 4122 |
| |
4123 | 4123 |
| |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
4124 | 4129 |
| |
4125 |
| - | |
4126 | 4130 |
| |
| 4131 | + | |
4127 | 4132 |
| |
4128 | 4133 |
| |
4129 | 4134 |
| |
|
Lines changed: 25 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
26 |
| - | |
27 |
| - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
28 | 35 |
| |
29 | 36 |
| |
30 | 37 |
| |
| |||
1073 | 1080 |
| |
1074 | 1081 |
| |
1075 | 1082 |
| |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1076 | 1094 |
| |
1077 | 1095 |
| |
1078 | 1096 |
| |
|
0 commit comments
Comments
(0)