DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: 10g Seeing Non-ASCII Characters as Multibyte

  1. #1
    Join Date
    Jan 2008
    Posts
    4

    10g Seeing Non-ASCII Characters as Multibyte

    Hi all, this is probably a stupid question for most of you but I'm a developer and not a DBA by any means. We moved from 9i to 10g and we're having new issues. 9i, JavaScript and ColdFusion all see this string as a 30-character string:

    “hello, this is just a ½ test”

    Note that it uses non-ASCII slanted quotes and a non-ASCII symbol for "1/2" -- this is how MS Word would write this string.

    Say, for example, that we have a VARCHAR2(30) column and I need to allow the application users to add up to 30 characters. They write it in Word, and Word says it's 30 characters. I test it using JavaScript and it's 30 characters. I use ColdFusion to make sure that I'm only handing off a 30-character string to Oracle and ColdFusion says it's 30 characters.

    Oracle 10g sees it as 35 characters and the operation fails.

    Our character set is AMERICAN_AMERICA.AL32UTF8 in 10g. We have lots of data that was stored in 9i with the AMERICAN_AMERICA.US7ASCII character set. Is it just a character set difference? What's our issue, here?

    I'm basically looking for something I can tell our DBA team so we can get this fixed for our needs. What should I tell them? What would you do?

    Thanks for the help!

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Hi,
    the issue is obvious - the column has capacity 30 bytes and the unicode string with non-ASCII characters is longer. Tell your DBA team to change the capacity of the column to 30 characters. That might be something like that:
    Code:
    alter table the_table modify the_column varchar2(30 char);
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  3. #3
    Join Date
    Jan 2008
    Posts
    4
    Thanks, I'll pass that info along to the team. It's definitely not obvious to me. Armed with that information I just found http://www.oracle-base.com/articles/...lization9i.php which really helps explain it all. Hopefully that does it!

  4. #4
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Quote Originally Posted by Glowball View Post
    Hopefully that does it!
    Absolutely!
    Ales
    The whole difference between a little boy and an adult man is the price of toys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width