symbol € lazarus / 16-Databases ---------------------------------------------------------------------- joviali · 2018-08-30 08:40 Hello, with the tzconection component I am attacking a fierebird database. In the properties field, I have: controls_cp = CP_UTF8 codepage = ISO8859_1 Dialect = 1 hard_commit = yes AutoEncodeStrings = ON In this way I could show the caratares: áéíóú ÄË ..... But with the symbol € if I do a sowmessage (tzsq.fielbyname ('description_symbol'). Asstring) I get a weird carater. How can I visualize it? ---------------------------------------------------------------------- BrunoK · 2018-08-30 08:51 instead of codepage = ISO8859_1 maybe codepage = ISO8859_15 ---------------------------------------------------------------------- joviali · 2018-08-30 11:38 codepage = ISO8859_15 Thanks, but it does not work. ---------------------------------------------------------------------- marcov · 2018-08-30 11:48 Is the database really in ISO? Otherwise codepage is utf8 might help. ---------------------------------------------------------------------- Soner · 2018-08-30 11:57 Which Database? It looks like your are using firebird. Also important how do you create the field. 1. Create the database with utf8: Code: MySQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i CREATE DATABASE mydatabase  DEFAULT CHARACTER SET UTF8...  2. use for  string fields utf8: Code: MySQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i CREATE TABLE ... description_symbol VARCHAR(10) CHARACTER SET UTF8, -- also important for case-insensitive search: COLLATE UNICODE_CI,..  Look here for firebird: http://www.destructor.de/firebird/charsets.htm ---------------------------------------------------------------------- BrunoK · 2018-08-30 13:26 Try to detect the CodePoint used in the .AsString. Put this function somewhere in your code Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function DumpString(aString : string) : String;var  aByteBuf :array of byte absolute aString;  ix : integer;begin  Result := '';  for ix:= 0 to Length(aString)-1 do    if ix=0 then      Result:='['+IntToHex(aByteBuf[ix], 2)    else      Result:=Result+' '+IntToHex(aByteBuf[ix], 2);  Result:=Result+']'end; then watch in the Inspect window the result of Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var  lFieldDump : String;  ...begin  ...  lFieldDump:=DumpString(tzsq.fielbyname ('description_symbol'). AsString);  ... // <- place a break point here and look value of lFieldDump.      //    if the sequence 'E2 82 AC' appears your field in the table is UTF-8.      //    If you find a '80' you are probably in CP1252      //    If you find '20 AC' it is UCS-2      //    If you find 'A4' it is ISO/CEI 8859-15end; ---------------------------------------------------------------------- joviali · 2018-08-30 16:57 Hi, Brunok. Quoteff I have tried the function Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i lFieldDump:=DumpString(tzsq.fielbyname ('description_symbol'). AsString); // <- place a break point here and look value of lFieldDump.  and the result is:[C2 80] that CodePoint is? ---------------------------------------------------------------------- joviali · 2018-08-31 10:09 Encoding Character stuff Named entity   not applicable Alt code   not applicable String stuff HTML/XML numeric entities   All but basic alphanumeric encoded (hexadecimal and decimal): € € UTF8 bytestring   as hex: c280 (UTF8 bytestring length is 2) URL-encoded UTF8   %C2%80 Python string before py3k   Unicode string:   u'\x80' UTF8 bytestring:   '\xc2\x80' ...in py3k   Unicode string:   '\x80' UTF8 bytestring:   b'\xc2\x80' Javascript (≥1.3)   "\u0080" LaTeX (incomplete experiment)   nothing interesting to report here Encodings that can encode this properly   utf_8   utf_16   latin_1   iso8859_2   iso8859_3   iso8859_4   iso8859_5   iso8859_6   iso8859_7   iso8859_8   iso8859_9   iso8859_10   iso8859_13   iso8859_14   iso8859_15   gb18030   cp037   cp424   cp500   cp875   cp932   cp1006   cp1026   cp1140 Encodings that will hurt your data   ascii   iso2022_jp   iso2022_jp_1   iso2022_jp_2   iso2022_jp_2004   iso2022_jp_3   iso2022_jp_ext   iso2022_kr   gb2312   gbk   big5   big5hkscs   euc_jp   euc_jis_2004   euc_jisx0213   euc_kr   hz   johab   koi8_r   koi8_u   mac_cyrillic   mac_greek   mac_iceland   mac_latin2   mac_roman   mac_turkish   ptcp154   shift_jis   shift_jis_2004   shift_jisx0213   cp437   cp737   cp775   cp850   cp852   cp855   cp856   cp857   cp860   cp861   cp862   cp863   cp864   cp865   cp866   cp869   cp874   cp949   cp950   cp1250   cp1251   cp1252   cp1253   cp1254   cp1255   cp1256   cp1257   cp1258