![]() |
Delphi-Version: 5
Unicode in DBGrid is not displayed correctly
Hi there!
I have very strange problem. Data from SQL server in Delphi Athens doesn't respect Unicode. ClientDataSet1.FieldDefs[0].DataType is ftWideString ShowMessage(TСlientDataSet1.FieldByName('Name').As String); //Shows correctly - "ÖФ" ShowMessage(DataSource1.DataSet.FieldByName('Name' ).AsString); //Shows correctly - "ÖФ" In DBGrid I see wrong chars. Where from this problem is? THank you in advance. |
AW: Unicode in DBGrid is not displayed correctly
Hi...8-)
Welcome. :dp: There is a DelphiPraxis forum in English. Would that be better for you? ![]() |
AW: Unicode in DBGrid is not displayed correctly
Welchen Typ und Kodierung besitzt
* das Feld, in der Datenbank? * die Tabelle? * die Datenbank? Welche Kodierung wird bei der Verbindung bzw. Übertragung verwendet? Ich würde mal vermuten, dass es als UTF-8 gespeichert wurde, aber als ANSI übertragen wird, wonach der Typ des TStringField es dann nicht besser macht. |
AW: Unicode in DBGrid is not displayed correctly
Thank you
I have MSSQL 2008 database and table, column type - nvarchar(50) Nothing is set to FD connection (I have tried StringFormat=Choose, no difference) I can see in ClientDataset data properly (like this), column's type here isftWideString : ShowMessage(TСlientDataSet1.FieldByName('Name').As String); ShowMessage(DataSource1.DataSet.FieldByName('Name' ).AsString); May be it is wrong assumption, but I guess at this point everything is OK (data in correct encoding). But in DBGrid it is shown in wrong way. Thanks. |
AW: Unicode in DBGrid is not displayed correctly
Delphi 5 ?
|
AW: Unicode in DBGrid is not displayed correctly
Nein, Delphi 12 Athens.
|
AW: Unicode in DBGrid is not displayed correctly
Pssst, in einigen Unterforen könnte auffallen, dass man oben die Delphi-Version auswählen kann, wie z.B. hier, im ersten Post (innerhalb von 24 Stunden änderbar).
Oder alternativ dieses im Nutzerprofil angeben. ![]() |
AW: Unicode in DBGrid is not displayed correctly
Hi.
Found strange think - data itself ok As soon as I change DBGrid's DEFAULT_CHARSET to something else - everrything shown as unicode / coirrectly. Why so? THanks. |
AW: Unicode in DBGrid is not displayed correctly
Sollte dieses DEFAULT_CHARSET bei Unicode nicht eigentlich ignoriert werden? :gruebel:
Wobei, dachte solche Property wurden inzwischen ausgebaut? (irgendwas mit Charset/Codepage) |
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:13 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz