Skip to content

Commit b518bb9

Browse files
committed
Docs update
1 parent 5f62aed commit b518bb9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CN/modules/ROOT/pages/master/6.4.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@ if (encoding_name && *encoding_name)
5050

5151
wchar.c,增加 GB18030 的函数指针:
5252
pg_gb180302wchar_with_len(const unsigned char *from, pg_wchar *to, int len) gb18030 -> wchar
53+
5354
pg_wchar2gb18030_with_len(const pg_wchar *from, unsigned char *to, int len) wchar -> gb18030
55+
5456
pg_gb18030_mblen(const unsigned char *s):返回 1/2/4。
57+
5558
pg_gb18030_dsplen(const unsigned char *s):ASCII 显示宽度 1;其它按 1 处理(与UTF8一致)。
59+
5660
pg_gb18030_verifier(const unsigned char *s, int len):校验字节范围,拒绝非法序列。
5761

5862
=== 与客户端的交互

EN/modules/ROOT/pages/master/6.4.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,15 @@ if (encoding_name && *encoding_name)
4747
=== Multibyte Character Handling
4848

4949
Function pointers for GB18030 are added in wchar.c:
50+
5051
pg_gb180302wchar_with_len(const unsigned char *from, pg_wchar *to, int len) gb18030 -> wchar
52+
5153
pg_wchar2gb18030_with_len(const pg_wchar *from, unsigned char *to, int len) wchar -> gb18030
54+
5255
pg_gb18030_mblen(const unsigned char *s):Returns 1/2/4.
56+
5357
pg_gb18030_dsplen(const unsigned char *s):Calculates the display width of a character. ASCII characters have a width of 1, while others are also treated as having a width of 1 .
58+
5459
pg_gb18030_verifier(const unsigned char *s, int len):Verifies that a byte sequence is a valid GB18030 character, rejecting illegal sequences.
5560

5661
=== Client-Server Interaction

0 commit comments

Comments
 (0)