Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 25th, 2004, 09:43 PM
imchi imchi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 126 imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 20 h 25 m 6 sec
Reputation Power: 20
UTF-8 to ASCII conversion

Hi,

Is there an easy way in Oracle to convert a varchar2 string
containing non-English UTF-8 characters to a string with the closest ASCII approximations thereof.
E.g. a', a:, a^ (a with the accent, umlaut, circumflex, respectively), would be converted to the plain a.
I know I can do it by first converting the characters to raw bytes with utl_raw and then processing them byte by byte. I am just wondering if there is already a utility somewhere that does it.
Thanks.

Reply With Quote
  #2  
Old June 28th, 2004, 03:30 PM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,307 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 4 h 28 m 57 sec
Reputation Power: 48
You might want to set up a login.sql file for each user that declares

ALTER SESSION SET NLS_LANG=whatever

for each language that needs to display. You do this on a per user basis.

Oracle will translate UTF8 to the correct charset.

Reply With Quote
  #3  
Old July 4th, 2004, 03:00 AM
swstephe swstephe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Brunei, Borneo Island, South East Asia
Posts: 9 swstephe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to swstephe
I don't know about utilites. The database won't do it for you ... unless you want to create your own custom database using "Oracle Locale Builder", (it comes with Oracle 9i). Then spend the next few hours, days, etc ... converting every Unicode character to an ASCII equivalent. It might get more complicated with the fact that many languages do funny things during translation. Mu:ller, in German, for example, is usually spelled "Mueller" in ASCII.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > UTF-8 to ASCII conversion


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway