utf8 encoding problem

A

Ad Ad

Hi,
I am retrieving a string from a txt file.
The file contains some utf8 characters.

I am comparing these characters against a default string.

The problem is that some of the characters are not stored in a default
format.

For example:
A is stored as A

Naturally when I compare the character it fails.
Strangely when I unpacked the character it appears as 65313 which is the
correct utf8 number for A.

Any way around this?

thanks.
 
E

Eric Hodel

Hi,
I am retrieving a string from a txt file.
The file contains some utf8 characters.

I am comparing these characters against a default string.

The problem is that some of the characters are not stored in a default
format.

For example:
A is stored as =EF=BC=A1

Naturally when I compare the character it fails.
Strangely when I unpacked the character it appears as 65313 which is =20=
the
correct utf8 number for A.

Any way around this?

Well, =EF=BC=A1 is "Fullwidth Latin Capital Letter A" from the "Hiragana =
and =20
Katakana" category (Unicode FF21) whereas A is "Latin Capital Letter =20
A" from the "Latin" category (Unicode 0041).

I don't know of a way to translate between the two categories, but =20
maybe that will help.=
 
A

Ad Ad

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top