Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Encoding question


This question is answered.


Permlink Replies: 2 - Last Post: Oct 3, 2015 11:35 AM Last Post By: Papas Jim Threads: [ Previous | Next ]
Papas Jim

Posts: 90
Registered: 10/13/00
Encoding question  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2015 12:36 AM
Hi,
i know almost nothing about encoding and i face the following problem.
I read a string from an Excel's cell ( s := sheet.cells[aRow,aCol];) in Greek language and i want to compare with another string from an MySQL database that uses utf8_general_ci encoding (t := aQuery.fieldbyname('name').asString).
the comparison s = t gives false for the same string because the ordinal values of some characters (eg. 'Ω') are different and i don't know how to compare them.
eg. for the letter 'Ω', from mySQL the value is 937 and from Excel is 8486
Whiche conversion i have to do, please ?

thanks in advance
Tom Brunberg

Posts: 329
Registered: 12/27/04
Re: Encoding question
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2015 10:08 AM   in response to: Papas Jim in response to: Papas Jim
Papas Jim wrote:
Hi,
i know almost nothing about encoding and i face the following problem.
I read a string from an Excel's cell ( s := sheet.cells[aRow,aCol];) in Greek language and i want to compare with another string from an MySQL database that uses utf8_general_ci encoding (t := aQuery.fieldbyname('name').asString).
the comparison s = t gives false for the same string because the ordinal values of some characters (eg. 'Ω') are different and i don't know how to compare them.
eg. for the letter 'Ω', from mySQL the value is 937 and from Excel is 8486
Whiche conversion i have to do, please ?

thanks in advance

According to https://en.wikipedia.org/wiki/Omega
The greek capital letter Omega is U+03A9 (decimal 937).
In technical symbols the Ohm sign is U+2126 (decimal 8486).
I'm not aware of any automatic conversion between these, since they are infact separate characters, so I think you need to do your own conversion.

Edited by: Tom Brunberg on Oct 3, 2015 8:09 PM
Papas Jim

Posts: 90
Registered: 10/13/00
Re: Encoding question  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2015 11:35 AM   in response to: Tom Brunberg in response to: Tom Brunberg
Tom Brunberg wrote:

The greek capital letter Omega is U+03A9 (decimal 937).
In technical symbols the Ohm sign is U+2126 (decimal 8486).
I'm not aware of any automatic conversion between these, since they are infact separate characters, so I think you need to do your own conversion.
Many thanks !
You are right. The problem arrived from Adobe Acrobat !
the Excel sheet was generated from Adobe Acrobat that translates the letter Ω as symbol Ω and the letter Δ as symbol Δ.
So I scan the Excel's string for these characters and translate them manualy.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02