Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-07

Have cp1251 displaying problem from MySQL database.

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andre

Hello all.

I have with cp1251 displaying problem from MySQL database. It seems, 1.5 years ago don't has problems.

MySQL is 5.0.45-community-nt
OS is WinXP
Lazarus 0.9.26.2 + fpc 2.2.2 installed from distributive

Charset in MySQL50Connection has 'cp1251' value,
also 'set character set cp1251' was tried.

In what there can be a problem ?
DBGrid runtime snap is attached.
Test Project also attached.

Andrey Gusev.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: s2.png
Type: image/png
Size: 6659 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090723/d3c4f9a1/attachment.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: xMYSQL.zip
Type: application/zip
Size: 4930 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090723/d3c4f9a1/attachment.zip>

Reply by email

Paul Ishenin
to Andre: Hello all. I have with cp1251 displaying problem from MySQL database. It seems, 1.5 years…
?????? ????? wrote 15 lines
Hello all. I have with cp1251 displaying problem from MySQL database. It seems, 1.5 years ago don't has problems. MySQL is 5.0.45-community-nt OS is WinXP Lazarus 0.9.26.2 + fpc 2.2.2 installed from distributive Charset in MySQL50Connection has 'cp1251' value, also 'set character set cp1251' was tried. In what there can be a problem ? DBGrid runtime snap is attached. Test Project also attached.

If you are working with Lazarus then all strings you pass to LCL must be utf8 encoded. I suspect you are passing cp1251 encoded strings and that's why you see '?' characters in your dbgrid.

Best regards,
Paul Ishenin.

Reply by email