Oracle Multi-Bytes vs Single-Byte

Hi,
We have to add japanese to our application, i had succesfully add japanese data in our single-byte database,
so why should we use a Multi-byte DB?
what is the gain to use a Multi byte DB vs a Single Byte?
does intermedia work with japanese in Single Bytes?
Is utf8 the best way to have an international DB?
We will have to add a lot of other char-set in the future.
Thanks

so why should we use a Multi-byte DB?
what is the gain to use a Multi byte DB vs a Single Byte? What you are doing is storing invalid multibyte characters into a single byte database. So each double byte Japanese characters are being treated as 2 separate single byte characters. You are using an unsupported but common garbage in garbage out approach, so in that sense you are using Oracle as a garbage container. :)
Let's look at some of the issues that you are going to have :-
All SQL Functions are based on the property of the single byte database character set WE8ISO8859P1. So LENGTH(), SUBSTR (), INSTR (), UPPER(), NLS_UPPER etc .. will yield incorrect results . For example a column with one Japanese character and one ASCII character will return a length of 3 characters rather than 2 characters. And if you want to locate a specific character in a mix ASCII and Japanese string using the SUBSTR() it will be very difficult, because to Oracle the string consists of all single byte characters, it will not skip 2 bytes for a Japanese character. Even if you don't have mix strings, you will need to write one routine for handling ASCII only and another for Japanese strings.
Invalid Data conversion , if your need to talk to another db using dblink say ,all the character conversion will be based on the single byte character set to the target database character set mapping, so the receiver will lose all the source Japanses characters and will get 2 single byte characters for each Japanese char instead .
Export and Import will have identical problems, character set conversion are performed during these operations, so all Japanese characters will be lost. This also means that you can not load correctly encoded Japanese data into your current single byte DB using IMPORT or SQLLOADER without data corruption ...
does intermedia work with japanese in Single Bytes?No
Is utf8 the best way to have an international DB?Yes
null

Similar Messages

  • Faster way to migrate from Single byte to Multi byte

    Hello,
    We are in the process of migrating from a 9i Single byte db to a 10g Multi byte db. The size of our DB is roughly 125 GB. We have fixed everything in the source database (9i) in terms of seamlessly migrating from a single byte to a multi byte db. The only issue is the migration window - curently we are doing an export/import since there is a character set migration involved and it's taking about 20+ hrs to do the import in 10g. The management wants to cut this down to less than 10 hours, if that's possible. I know the duration it takes to import depends on many factors like the system/OS configuration, SAN, etc but I wanted to know what , in theory, is considered the fastest method of migrating a database from single byte to multi byte.
    Have anybody here gone through this before?
    Thanks,
    Shaji

    If the percentage of user tables containing some convertible data (I am assuming you will not have any truncation or lossy data) is low, you can export only those tables, truncate them, and rescan the database. This should report no convertible data, except some CLOBs in Data Dictionary. Such database can be migrated to AL32UTF8 using csalter.plb. After the migration, you import only the previously exported subset of tables.
    Note, for this process to work, no convertible VARCHAR2, nor CHAR, nor LONG data can be present in the Data Dictionary.
    The process should be refined by dropping and recreating indexes on the exported tables as recreating an index is faster then updating it during import. You should also disable triggers so that they do not interfere with the migration (for example, they should not update any "last_updated" timestamp columns).
    If the number and size of affected tables is low compared to the overall size of the database, the time saved may be significant.
    There may also be tables that require even more sophisticated approach. Let's say you have a multi-gigabyte table that stores pictures or documents in a BLOB column. The table also has a single text column that keeps some non-ASCII descriptions of the stored entities. Exporting/truncating/importing such table may be still very expensive. A possible optimization is to offload the description column to an auxiliary table (together with ROWIDs), update the original column to NULL, export the auxiliary table, drop it, rescan the database, migrate with csalter.plb, re-import the auxiliary table, and restore the original column. If pictures alone occupy, for example, 30% of the whole database, such approach should yield significant time saving.
    -- Sergiusz

  • Unable to generate single byte character when used TO_SINGLE_BYTE

    Hi All,
    Can anyone help me in getting the output for the below single byte query. When tried it says INVALID NUMBER.
    Step 1 :-
    select RAWTOHEX('2Z') from DUAL; -- 325A
    Step 2:-
    SELECT TO_SINGLE_BYTE(CHR('325A')) FROM DUAL;
    The above query when executed it says "ORA-01722: invalid number".
    I tried using VARCHAR2 instead of CHR it throuws the below exception,
    "ORA-00936: missing expression".
    But the same query if no characters are passed is working fine.
    SELECT TO_SINGLE_BYTE(CHR('3251')) FROM DUAL;
    Thanks,
    Ravi

    TO_SINGLE_BYTE is used to convert multi-byte characters to single-byte characters. '325A' is not a multi-byte character so can't be converted.
    Use HEXTORAW to convert the hex value back to a raw value.

  • Does Oracle XML Parser support double byte charset?

    Hi,
    Does Oracle XML Parser support double byte characters such as Korean or Chinese? If so, please tell me what version and how to construct xml/xsl files (...encoding="???")?
    Thanks for any help,
    Tuan

    Hi Raymond,
    Thank you for your help. It worked when I running in JDeveloper with your posted code. However, when I tried in my real application, it won't work.
    The problem is for localization purposes, my application using some texts display in browsers are saved in Unicode file. Later, application runs and depends on languages setting in browsers, with JavaServlet retrieves those texts and saves in formated xml StringBuffer. Then, using existed XSL Stylesheet file and OracleXMLParser to generate an output HTML.
    It has worked fine with English, France or others (single byte characters), but it can't
    for double bytes character such as Korean or Chinese. I also tried different charset in xml file.
    The following is one of returning errors:
    -- oracle.xml.parser.v2.XSLException: XSL-1004: Error while parsing input XML document (<Line 1, Column 552>: XML-0221: (Fatal Error) Invalid char in text.)
    I run this app in win2000/IIS with ServletExec3.0, JDK1.2.2 and OracleXMLParser v2.0.2.10
    Thank you for any helps,
    Tuan
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Raymond Hayes Jr ([email protected]):
    Nothing fancy 'cause I'm half asleep but I used your xml/xsl and it seemed to work. No errors anyway. This is what I put together in JDeveloper 3.2
    package demo;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import oracle.xml.parser.v2.*;
    public class CuriosityKilledTheCat extends HttpServlet {
    * Initialize global variables
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    * Service the request
    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    try
    XSLStylesheet xsl = new XSLStylesheet( new URL ("file:///c:\\temp\\input.xsl") , null );
    XSLProcessor xp = new XSLProcessor();
    XMLDocument xd = new XMLDocument ();
    XMLDocumentFragment xf = new XMLDocumentFragment();
    xf = xp.processXSL ( xsl , new URL ( "file:///c:\\temp\\input.xml") , null );
    System.out.println ( "here" );
    xd.appendChild( xf );
    xd.print ( response.getOutputStream() );
    catch ( Exception e )
    System.out.println ( e.getMessage() );
    * Get Servlet information
    * @return java.lang.String
    public String getServletInfo() {
    return "demo.CuriosityKilledTheCat Information";
    }<HR></BLOCKQUOTE>
    null

  • How do I convert a double-byte encoded file to single-byte ASCII?

    Hello,
    I am working with XML files (apparently coded in UTF-8) which encoded in double-byte characters.
    The problem is the characters for end of line: 00 0D 00 0A
    This double byte end of line is causing a problem with a legacy conversion tool (which deals with 0D 0A). The file itself contains no
    accented/international characters, so in principle converting to single-byte should not cause any problems.
    I have tried to convert this file with tools like native2ascii and the conversion tools that are part of Notepad++ but without
    any luck - the "00 0D 00 0A" are still present in the output
    Can anyone point me to a tool or some code that can convet this file into single-byte?
    Thank you.

    Amiens wrote:
    native2ascii.exe -encoding UTF-16 -reverse INPUT.xml OUTPUT.xml
    gives 00 00 0 0D 00 00 00 0A
    so clearly that is not the required output.What you've got there is UTF-16 encoded text that's been converted to UTF-16. Get rid of the "-reverse" option and you should see the result you expect.

  • To find out whether a character is of Single byte or Double bytes

    hi,
    is there any built-in class to find whether a character is a single byte or double byte. is there any method to do so?? If possible can someone provide a sample code snippet to do a check for single byte and double byte characters.
    thanx in advance.....

    If you are asking what size the char primitive is, it's 16 bits.
    If you want to know the numerical value of a char, you can cast it to an int and compare it to 255 to see if it fits in 1 byte.

  • Acrobat replaces single-byte character codes with octal strings in content stream, how to prevent?

    I have thousands of PDFs, mainly text, all fonts are subsets, indexes starting from 1. In page content stream I see character indexes represented as single bytes: binary 1, 2, 3, etc. But, after optimizing files with Acrobat (I use it to save to 1.6 version with compressed object streams etc.) those single bytes become octal strings like \001, \002, ... . Raw stream size is increased by factor 1.5, and after a flate filter there is still 1-2 kB increase for each page. As there are thousands of pages, total (and totally useless) increase is considerable and doesn't go well with my goal of creating as small package as possible.
    Can this behavior be prevented (with something like registry setting)?

    what are you calling getBytes() on?he's calling getBytes() on his String object.
    @ puneet_k,
    I don't have a solution but note that on Unix-like systems a newline is a single byte 0x0a and on DOS-like systems (Windows) it is a sequence of bytes 0x0d and 0x0a.
    Some text editors handle both.
    I'm not sure but I think on Unix,
    new String("\n").getBytes() equals new byte[] { 0x0a }
    and on DOS
    new String("\n").getBytes() equals new byte[] { 0x0d, 0x0a }

  • Form English Char ( Single Byte  ) TO Double Byte ( Japanese Char )

    Hello EveryOne !!!!
    I need Help !!
    I am new to Java ,.... I got assignment where i need to Check the String , if that string Contains Any Non Japanse Character ( a~z , A~Z , 0 -9 ) then this should be replaced with Double Byte ( Japanese Char )...
    I am using Java 1.2 ..
    Please guide me ...
    thanks and regards
    Maruti Chavan

    hello ..
    as you all asked Detail requirement here i an pasting C code where 'a' is passed as input character ..after process it is giving me Double Byte Japanese "A" .. i want this to be Done ..using this i am able to Convert APLHA-Numeric from singale byte to Doubel Byte ( Japanse ) ...
    Same program i want to Java ... so pleas guide me ..
    #include <stdio.h>
    int main( int argc, char *argv[] )
    char c[2];
    char d[3];
    strcpy( c, "a" ); // a is input char
    d[0] = 0xa3;
    d[1] = c[0] + 0x80;
    printf( ":%s:\n", c ); // Orginal Single byte char
    printf( ":%s:\n", d ); // Converted Double Byte ..
    please ..
    thax and regards
    Maruti Chavan

  • Single byte languages

    Hello,
    I have a web application that is internationalized to a certain degree, in that it can be easily localized, as long as the language does not use a double-byte character set. For purposes of the product specification/documentation, how would I go about obtaining a complete list of the "single-byte" languages that such an application would support? (ie, English, Spanish, French, German, etc.) I haven't been able to obtain this list via a simple Google search, as I had originally suspected.
    Thanks!

    Hello,
    I have a web application that is internationalized to
    a certain degree, in that it can be easily localized,
    as long as the language does not use a double-byte
    character set. Huh? Why would that be a limitation? Neither java nor browsers are limited in that way.
    For purposes of the product
    specification/documentation, how would I go about
    obtaining a complete list of the "single-byte"
    languages that such an application would support?It doesn't have anything to do with "languages". It has to do with charsets.
    It it possible that english alone has several hundred unique charsets. I would suspect that other languages have more than a couple each.

  • How to get a decimal number from three single byte numbers

    i'am in a difficult situation. I have motor which provides me the number of steps moved as three numbers of length one byte.I 'am attaching the program with this message. Here the commands from index 2-4 outputs will provide the number of steps moved. But these are numbers with a single byte length(<256). So how can I get the corresponding decimal number from these three single byte length numbers. please reply
    Attachments:
    stop2.vi ‏11 KB

    Without knowing what motor you are using, I'm guessing that you probably need to use the Join Numbers to combine the bytes into a U32.  The other option is to use the Type Cast function.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • I need to query single bytes - Pls help

    Hi, I have got a method which performs different operations. I would like to update the state of a variable with the different steps occurred in the code execution and, at a later time, to query this variable to check what to do.
    Example:
    variable = -1;//This is an instance variable
    if (cacheCleared) {
      variable &= PageCanvas.CACHE_CLEARED;
    if (imagesCleared) {
      variable &= PageCanvas.IMAGES_CLEARED;
    if (xmlCleared) {
      variable &= PageCanvas.XML_CLEARED;
    //And so on...Then, after the method returns, I'd like to be able to to query 'variable' to check which steps have been performed with something like:
    if ((variable == PageCanvas.CACHE_CLEARED & PageCanvas.IMAGES_CLEARED)) {
       //do something;
    } else if (variable == PageCanvas.CACHE_CLEARED & PageCanvas.XML_CLEARED) {
      //do something else
    }I saw somewhere something like offset concepts, but I don't know how to implement it. Could you keep in mind that we run in a memory constrained environment, therefore I'd like to use, let's say, an int and having the constants as bytes?
    Thanks for any help.

    Hi, I have tried the following code:
    byte b1 = 1;
    byte b2 = 2;
    byte b3 = 4;
    byte b4 = 8;
    byte results = 0;
    results |= b1;
    results |= b3;
    results |= b4;
    System.out.println(results == (results | b1));
    System.out.println(results == (results | b2));
    System.out.println(results == (results | b3));
    System.out.println(results == (results | b4));And the result is:
    true
    false
    true
    true
    However, I noticed that it's important to assign the bytes the values of the bits right to left:
    0000 0001
    0000 0010
    0000 0100
    0000 1000
    The first byte should have value 1
    The second should have value 2
    The third should have value 4
    The fourth should have value 8
    So that the | operator works.

  • IKM oracle multi table insert

    Hii...Experts..
    How can I load data from a single source table to multiple target tables using IKM oracle multi table insert ???
    Please help me with an example.
    Regards

    What David is asking is for you to go to operator and review the failed task, copy the SQL and paste it up here, run the SQL in your sql client (Toad / SQL Developer) and try and ascertain what objects your missing causing your SQL Error.
    Have you followed the link posted above? Have you placed the interfaces in a package in the right order? Are you running the package as a whole or individual interfaces? I dont think the individual interfaces will work with this IKM as its designed for one to feed the other.
    Please detail the steps you've taken, how many interfaces you have and what options you have chosen in the IKM options for each interface - Its tricky to diagnose your problem and when you say "I can't understand what to do and how to do...
    So please give the step wise solution to do that interface.. or please give with an example.." it means a lot of people will ignore your post as we cant see any evidence of you trying!
    p.s I see you have resurected a thread from 2009 - 1) I dont think the multi-table insert KM was available with ODI at that time (10G) 2) The thread is answered / closed so not many people will look at it 3) Proceedurs should only really be used when you cant do it with an interface, you lose all the lovely lineage between objects with you get with an interface.
    Hope this helps - please post your setup , your error and how you have configured the interfaces and package so far.

  • Insert multiple records into a table(Oracle 9i) from a single PHP statement

    How can I insert multiple records into a table(Oracle 9i) from a single PHP statement?
    From what all I've found, the statement below would work if I were using MySQL:
         insert into scen
         (indx,share,expire,pitch,curve,surface,call)
         values
         (81202, 28, 171, .27, 0, 0, 'C' ),
         (81204, 28, 501, .25, 0, 0, 'C' ),
         (81203, 17, 35, .222, 0, 0, 'C' ),
         (81202, 28, 171, .27, 2, 0, 'C' ),
         (81204, 28, 501, .20, 0, 1, 'C' ),
         (81203, 28, 135, .22, 1, 0, 'C' )
    The amount of records varies into the multiple-dozens. My aim is to utilize the power of Oracle while avoiding the i/o of dozens of single-record inserts.
    Thank you,
    Will

    You could look at the INSERT ALL statement found in the documentation here:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_913a.htm#2133161
    My personal opinion is that you probably won't see any benefit because under the hood I think Oracle will still be doing single row inserts. I could be wrong though.
    The only way to confirm was if you did a test of multiple inserts vs an INSERT ALL, that is if the INSERT ALL met your requirements.
    HTH.

  • Converting bytes to unsigned bytes

          int u=0;
          int i=32;
    byte []  data1 = new byte[1024];
    int[] unsignedValue=new int[1024];
    while(u<100){
                        unsignedValue[u] =data1[i] & 0xff;
                          u++;
                          i++;
                       } from input stream iam storing bytes in data1.now i want to convert specific bytes to unsigned bytes.
    here i tryed in the above way but i want to convert
    2 to 8
    12 to 18
    22 to 28
    bytes to unsigned and i want to store how can i do this?

    nanda_java wrote:
    in my fist post only i multiplyes with 0xff .and i gave code ...my question is how to multiply only specific
    2 to 8
    12 to 18
    22 to 28
    bytes with 0xff .the bytes are in data1.I have no idea what you're saying, and I have no idea what the significance of those ranges is.
    Look, you've already been told this twice: Say you get the byte 0xFE. That byte is neither signed nor unsigned. Get that into your head. It's simply a byte. The concept of signed/unsigned only comes into play when you decide to treat that as an integer value. You might want it to represent -2, or you might want it to represent 254. If you store it in a Java byte, it will represent -2. You cannot change that. If you want 0xFE to mean 254, then mask it with 0xFF and store it in an int.
    byte b = -2;
    System.out.println(b & 0xFF); // prints 254Furthermore, as already stated, in many cases it doesn't matter if it's signed or unsigned. If you do addtion, subtraction, multiplication (I think), AND, OR, XOR, you'll get the same byte result, regardless of whether you consider it signed or unsigned, and again, signed/unsigned only matters if you care about the numerical value of that signed result, rather than simply its bit pattern. 0xFE - 0x01 = 0xFD, and you can take that as -2 -1 = -3 or as 254 - 1 = 253. The bytes are the same regardless.
    What part are you not understanding? Don't just keep repeating the same thing about how it's unsigned and 2 to 8 and all that nonsense.
    So please, define your problem more clearly.
    Edited by: jverd on Jan 10, 2008 8:53 AM

  • [svn:osmf:] 11205: Fix bug FM-169: Trait support for data transfer sample doesn' t display bytes loaded and bytes total for SWF element

    Revision: 11205
    Author:   [email protected]
    Date:     2009-10-27 15:04:26 -0700 (Tue, 27 Oct 2009)
    Log Message:
    Fix bug FM-169: Trait support for data transfer sample doesn't display bytes loaded and bytes total for SWF element
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-169
    Modified Paths:
        osmf/trunk/apps/samples/framework/PluginSample/src/PluginSample.mxml
        osmf/trunk/apps/samples/framework/PluginSample/src/org/osmf/model/Model.as

    The bug is known, and a patch has been submitted: https://bugs.freedesktop.org/show_bug.cgi?id=80151. There's been no update since friday, so I wonder what the current status is, or if it's up for review at all.
    Does anyone know how we can be notified when this patch hits the kernel?

Maybe you are looking for

  • Decimals upto 2 in alv report

    Hi to all abapers, I have to show only upto 2 decimals in the field of an alv report but it is of type p and decimals 4.I dont want to change its type to 2 decimals due to some calculations.So can we show upto 2 decimals in the report? Thanks in Adva

  • Google sites vs Business Catalyst

    Hi All Was wondering if anyone has any experience of google sites? Have been toying with the idea of hosting individual project sites for clients on our own domain or a subdomain but a colleague suggested looking into google sites.  Having had a look

  • USB 2.0 probl

    Hi i've got a Muvo 4gb and i've just got a new computer with xp home edition SP2 and its got usb2 ports. When i connect my mp3 player to it its recognized as a muvo but as i try to install it nothing happens, windows says drivers missing or something

  • Installing Data Guard Manager

    Hi Everyone, Regarding Data Guard Manager, I dont have any idea. Does it come with OEM or do i have install it separately. Thanks in advance

  • Adding a Windows 8/2012 KMS key to a 2008 R2 KMS server.

    Hello, I have my KMS keys for Windows 8/2012.  Can these be added to a 2008 R2 KMS server or is there a document that details this? Shawn