Pergunta

I created a table in Firebird 2.5 with the following code:

CREATE TABLE DMSV (MASV  CHAR(8) CHARACTER SET ASCII NOT NULL,
TENSV VARCHAR(120) CHARACTER SET UTF8 NOT NULL,
LOP CHAR(10) CHARACTER SET ASCII NOT NULL, 
SDT VARCHAR(11)CHARACTER SET ASCII NOT NULL,
EMAIL VARCHAR(100) CHARACTER SET ASCII,FACE VARCHAR(100)
CHARACTER SET UTF8, PRIMARY KEY (MASV));

When i type Vietnamese character into Column "TenSV", the result cannot show the right character, it only shows the "?" character for some special Vietnamese character (ex: "?" for "ể"). I changed the character set to WIN1258 but the problem cannot be solved. What should i do to store the correct character? Thanks a lot for any help. :D

Foi útil?

Solução

The character (ể) is unicode codepoint U+1EC3, which is not part of WIN1258, and therefor won't be stored (or displayed) using WIN1258. Make sure you use UTF8 for both your connection characterset, database/column characterset and that the application, console or whatever you use for display also supports this character.

See also http://www.scarfboy.com/coding/unicode-tool?s=U%2B1ec3

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top