• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5544
  • Last Modified:

Converting from WE8ISO8859P1 to UTF8 character set Oracle 10g

Hi ,

below is the query iam using to convert from the WE8ISO8859P1 character set to UTF8 character set. When I do that i get different characters . Can any one guide me whether the below output is correct if not can you guide me on how to go abt it.

SQL> select business_name, dump(business_name, 1016), convert (business_name, 'UTF8', 'WE8ISO8859P1') from customers where vid = 931402;
 
BUSINESS_NAME
----------------------------------------------------------------
DUMP(BUSINESS_NAME,1016)
--------------------------------------------------------------------------------
CONVERT(BUSINESS_NAME,'UTF8','WE8ISO8859P1')
--------------------------------------------------------------------------------
t¿s¿sstt¿
Typ=1 Len=9 CharacterSet=US7ASCII: 74,e9,73,e9,73,73,74,74,e9
t¿¿s¿¿sstt¿¿

Thanks in advance

0
Swaminathan_K
Asked:
Swaminathan_K
  • 2
  • 2
2 Solutions
 
Franck PachotCommented:
Hi,

The output depends on the client characterset setting, and the client OS characterset.
you can check if the conversion is good with:
dump(convert (business_name, 'UTF8', 'WE8ISO8859P1'),1016)

Then you can check if:
- client characterset (as defined by NLS_LANG) is UTF8
- client (sqlplus, OS, telnet if it goes through telnet, ...) supports UTF8

Regards,
Franck.
0
 
Swaminathan_KAuthor Commented:

Hi , here are my findings... I still get a ? character when i convert , pls guide..


If I keep the NLS_LANG environment variable as .UTF8, the dump displays the correct values. However the string does not display correctly, it shows question marks.


Then you can check if:
- client characterset (as defined by NLS_LANG) is UTF8
Yes

- client (sqlplus, OS, telnet if it goes through telnet, ...) supports UTF8
I tried connecting to our  database which is UTF8, and tried reading some special characters, and that displays fine. So I amthat assuming  sqlplus supports UTF8 along with SecureCRT and our OS.
0
 
Franck PachotCommented:
Can you confirm that
- client is UTF8
- you can read text from UTF8 database (and you know that thext in database is UTF8 because you checked the dump)
- the convert to UTF8 is fine (you checked it with dump)
- but that converted text is not display properly in the same client
?

0
 
Swaminathan_KAuthor Commented:
Thanks a lot for all inputs. I got it done
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now