How to translate native Unicode to ascii Unicode

I want to read in the user input and then store this input as ascii unicode into the database. Can anyone tell me how?!

Wow that looks like one big hack after another. :)
well.. you see..... I designed my database system with
the user interface being the web browser. Because the
Chinese words are 2-byte fonts, hence, there will be
characters like ' and \ which are actually the
keywards of SQL! so I solve that problem by encode the
user input string (via POST) to big5 and then pass to
my database. However!!!! There's a magic word of
unicode \u92b4 not been displayed properly!! It just
basically showed up as question mark.... Hence I
thought about the native2ascii utility which convert
native Chinese words into \u notation. Through this
forum, I actually managed to find the answer, but yet
another question arise again -- I discovered that it
does not even show up properly after the \u notation
process!! Within Java, all characters are 2 bytes (UTF-16), so there's nothing special about Chinese characters. The characters ' and \ are not subcomponents of Chinese characters or any other character. You just have to be careful when you load them into Java, that you specify the correct encoding.
I think the problem is due to the inproper big5
encoding... this is usually how it's supposed to be
done:
String big5Str = new
String(myInputString.getBytes("8859_1"),"Big5");No this is not how it is supposed to be done. I see this idiom very frequently in this forum, and it is wrong. If you don't believe me, read the javadoc for the String constructor, and the javadoc for String.getBytes(). They say: "The behavior of this (constructor | method) when the given bytes are not valid in the given charset is unspecified."
You seem to think that myInputString contains data in a specific encoding. It does not, it just contains a string of characters. If it was constructed with mismatched data/encoding, then that's where your problem lies.

Similar Messages

  • Convert unicode to ascii

    I have a unicode like "100", which represents ASCII code: "d"
    I can simply convert unicode to ascii code if using Visual Basic function: chr(); but how can I do the same job under cocoa ?
    thank you.
    G5   Mac OS X (10.4)  

    Well, if you wanted to create a single-character NSString from an integer value, you could do something like:
    unichar oneChar = 100;
    NSString *oneCharStr = [NSString stringWithCharacters:&oneChar length:1];
    What are you trying to accomplish?

  • Unicode to ascii

    hello,everyone,
    i have a problem in java programming.
    how can i convert the unicode to ascii?

    If you just need to convert a file then java provide a tool: native2ascii.exe
    if you need to do it in java read the file in to a string then save it using
    OutputStreamWriter out = new OutputStreamWriter(fout, "US-ASCII");

  • How to install and use the Khmer unicode Khmer MEF1 and Khmer MEF2?

    How to install and use the Khmer unicode Khmer MEF1 and Khmer MEF2?
    from www.mef.gov.kh in the bottom of the page, you can get the unicode for the ms office

    I think that stuff is for windows, a waste of time trying to use it on a Mac.
    There is no need to download anything for Khmer on a Mac.  Apple provides Khmer fonts and keuyboards with OS X.
    OS X Mountain Lion: Type in another language
    MS Word for Mac does not support Khmer.  Use TextEdit, Pages, Nisus Writer, LibreOffice instead

  • How to setup the connection between non-unicode client and unicode server?

    hi.
    we played the program in 4.6x that call a data from unicode server (ECC6.0) to non-unicode server.  ( not played in the unicode server.)
    When a program ended that English Character was normal, but Korean Chinease... was unknown text.
    I think conversion from unicode to non-unicode is a main reason.
    General Notes are issued for the unicode side rfc connection configuration.
    but, i want to know how to setup into the non-unicode system to interface with unicode system.
    I hope your great answer.

    Hi,
    For taht you have to deploy korean and chinese langauges seprately on non unicode system.Then try to connect to the unicode system.It will work for you.
    Regadrs
    Vijay kumar

  • How to change HP Touchpad font to unicode?

    Hi there, I recently bought a touchpad and noticed that some of the websites the letters are not displayed correctly (Asian languages). This is because HP touchpad font is not unicode by default. My question is how do I change the font to Unicode? Thanks all
    Post relates to: HP TouchPad (WiFi)
    This question was solved.
    View Solution.

    hi,
    If you know the font that you need than you can use WebOSQuickInstall to add .
    you can google to get that software.
    When you are in WebOs Quickinstall window
    Go to Tools
       go to Linux Commandline
    that will get you to comand window so you can backup your fonts
    as well as copy new fonts to /usr/share/fonts/
    where the fonts should be.
    when you are done. just type : reboot
    it will restart your touchpad.
    Warning !  your font might  cause your touchpad to freeze, you can use
    WebOSDoctor to re-install.
    Here is the link for of how to do  for Vietnamese unicode fonts ( You can substitude with your Asian language fonts )
    Good luck !.
    http://www.tinhte.vn/hoi-dap-chia-se-kinh-nghiem-331/tieng-viet-cho-webos-3-0-2-final-update-chep-xe...

  • How will I know my existing DB is in Unicode or Non-Unicode

    I know you will get character set information with following query.
    select PARAMETER, value from nls_database_parameters
    where parameter = 'NLS_CHARACTERSET';
    Result is : WE8MSWIN1252 (My DB is hosted on Windows server 2003 64Bit Machine and created using default parameter)
    My Question is how do I know that WE8MSWIN1252 is unicode- or non-unicode ?
    Thank you for reading.
    Thanks

    Only the values 'AL32UTF8' and 'UTF8' indicate an Unicode encoding if returned by this query. All other character sets are non-Unicode. The query:
    select PARAMETER, value from nls_database_parameters
    where parameter = 'NLS_NCHAR_CHARACTERSET';can also return AL16UTF16, which is Unicode as well, but this character set is valid for NCHAR/NVARCHAR2/NCLOB data types only.
    -- Sergiusz

  • Diacritic: unicode to ascii

    I'm looking for an algorithm to convert Unicode ro ASCII characters. The algorithm does not have to cover all unicode characters, but Latin1 and Latin 2 should be covered. If the character cannot be converted (no representation in ascii), then i can do it manually (or use a "?")
    thanx.
    trev

    From your title I assume you want to just drop any diacritics attached to the characters?
    Some time ago I downloaded a file from the Unicode site which contains lines like010C;LATIN CAPITAL LETTER C WITH CARON;Lu;0;L;0043 030C;;;;N;LATIN CAPITAL LETTER C HACEK;;;010D;This contains the Unicode description of the character Č in particular that it can be decomposed to 0043 (C) and 030C (combining hook above). I don't see that property exposed in the java.lang.Character class, but you could use it to create a hard-coded mapping table.

  • How to fix "cannot convert between unicode and non-unicode string data types" :/

    Environment: SQL Server 2008 R2
    Introduction:Staging_table is a table where data is being stored from source file. Individual and ind_subject_scores are destination tables.
    Purpose: To load the data from a source file .csv while SSIS define table  fields with 50 varchar, I can still transfer the data to the entity table/ destination and keeping the table definition.
    I'm getting validation error "Cannot convert between a unicode and a non-unicode string data types" for all the columns.
    Please help

    Hi ,
    NVARCHAR = DT_WSTR
    VARCHAR = DT_STR
    Try below links:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ed1caf36-7a62-44c8-9b67-127cb4a7b747/error-on-package-can-not-convert-from-unicode-to-non-unicode-string-type?forum=sqlintegrationservices
    http://social.msdn.microsoft.com/Forums/en-US/eb0d1519-4be3-427d-bd30-ae4004ea9e8d/data-conversion-error-how-to-fix-this
    http://technet.microsoft.com/en-us/library/aa337316(v=sql.105).aspx
    http://social.technet.microsoft.com/wiki/contents/articles/19612.ssis-import-excel-to-table-cannot-convert-between-unicode-and-non-unicode-string-data-types.aspx
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • How can I check the system is unicode or non-unicode?

    HI
    I have simple questions.
    and question are same as subject.
    1.Using SAP 6.20 but how can I distinguish unicode or non-unicode system?
    does answer can be difference of released version only?
    2.and if system is non-unicode system where I can see  the kind of specific language package that installed in system..
    Thank you.

    Thank you very much
    You solved my question.
    and once I saw your answer another question comes out.
    if I want add lanuage package just add 'enter language'
    from 'enter country' in the display of execution 'RSCPINST'?
    I'm just double checking for not make mistake.
    and how many language package can install and use for one system?
    is there no limit of number?
    best regards.
    Bae.

  • How to escape the special character ' (ascii 39) in a select query?

    Hi,
    does anybody know how to escape the special character ' (ascii 39) in a select query?
    I've tried a lot of ways but nothing seems to work, for example I try to get all
    names in table foo where coloumn name contains a '-sign (ascii 39)
    select name from foo where name like '%\'%';
    select name from foo where name like '%{'}%';
    select name from atg_horse where name like '%chr(39)%'
    ... but neither works, I end up with a ORA-01756: quoted string not properly terminated
    I would apriciate any help
    /Carl-Michael

    friends
    thanks for ur time and effort that u gave to reply to my problem.
    But my main problem is that when my application (VC++ 7) fires the following query in the oracle database , it does not return any rows.
    SELECT count(*) FROM ORGANISATION WHERE UPPER(ORGANISATION.ORGANISATIONNAME)
    LIKE N'β%' ORDER BY ORGANISATION.ORGANISATIONNAME
    the above question in the previous thread was just to check on sql plus as it's editor does not support unicode characters.

  • What is the programming (ABAP) difference between Unicode and non Unicode?

    What is the programming(ABAP) difference between Unicode and non Unicode?
    Edited by: NIV on Apr 12, 2010 1:29 PM

    Hi
    The difference between programming in Unicode or not Unicode is that you should consider some adjustments to make on the Program "Z" to comply with the judgments Unicode Standard.
    In the past, developments in SAP using multiple systems to encode the characters of different alphabets. For example: ASCII, EBCDI, or double-byte code pages.
    These coding systems mostly use 1 byte per character, which can encode up to 256 characters. However, other alphabets such as Japanese or Chinese use a larger number of characters in their alphabets. That's why the system using double-byte code page, which uses 2 bytes per character.
    In order to unify the different alphabets, it was decided to implement a single coding system that uses 2 bytes per character regardless of what language is concerned. That system is called Unicode.
    Unicode is also the official way to implement ISO/IEC 10646 and is supported in many operating systems and all modern browsers.
    The way of verifying whether a program was adjusted or not, is through the execution of the UCCHECK transaction. Additionally, you can check by controlling syntax (making sure that this asset verification check Unicode).
    The main decisions to adjust / replace are (examples):
    ASSIGN H-SY-INDEX TEXT TO ASSIGN <F1> by
    H-SY-INDEX TEXT (*) TO <F1>.
    DATA INIT (50) VALUE '/'. by
    DATA INIT (1) VALUE '/'.
    DESCRIBE FIELD text LENGTH lengh2 by
    DESCRIBE FIELD text LENGTH lengh2 in character mode.
    T_ZSMY_DEMREG_V1 = record_tab by
    record_tab TO MOVE-Corresponding t_zsmy_demreg_v1.
    escape_trick = hot3. by
    escape_trick-x1 = hot3.
    itab_txt TYPE wt by
    ITAB_TXT TYPE TABLE OF TEXTPOOL
    DATA: string3 (3) TYPE X VALUE B2023 '3 'by
    DATA: string3 (6) B2023 TYPE c VALUE '3 '.
    OPEN DATASET file_name IN TEXT MODE by
    OPEN DATASET file_name FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
    or
    OPEN DATASET file_name FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    CODE FROM PAGE TRANSLATE a_codepage record by
    record TRANSLATE USING a_codepage.
    CALL FUNCTION 'DOWNLOAD' by
    CALL METHOD cl_gui_frontend_services => gui_download
    CALL FUNCTION 'WS_DOWNLOAD' by
    CALL METHOD cl_gui_frontend_services => gui_download
    CALL FUNCTION 'UPLOAD' by
    CALL METHOD cl_gui_frontend_services => gui_upload
    CALL FUNCTION 'WS_UPLOAD' by
    CALL METHOD cl_gui_frontend_services => gui_upload
    PERFORM USING HEAD APPEND_XFEBRE +2. by
    PERFORM USING HEAD APPEND_XFEBRE +2 (98).
    Best Regars
    Fabio Rodriguez

  • How to translate field names in SAP R/3 (SE63)?

    Hi gurus,
    I actually have an unsolved with my translation job in SAP R/3. It's urgent and I just can't find a solution for that:
    I'm using the translation menu with transaction SE63.
    Though I have translated the object types domain (DOM), data elements (DTEL) and table descriptions (TABT), I get no translated field name (e.g. in selection screens for summary tables).
    Which object type do I have to translate? Or is there another SAP transaction or a table where I can translate the field names?
    Thank you for answering!
    Best regards
    T. Duong

    Dear T. Duong,
    In SE63 -> Repository Texts.
    Also, visit Note 585116.
    WebAs Support Package 25 converts the SAP translation environment (SE63) to a Unicode-enabled version for short text translation. This conversion requires some system adjustments before translation can continue.
    If you never translated in your system before Support Package 25 was imported, you can simply ignore this note because your system does not contain any translation data that needs converting.
    Please download the current documentation attached to this note:
    Choose file UC-SE63_DE.PDF or UC-SE63_EN.PDF if you want to read the end user documentation.
    Choose file UC-TransAdmin-DE.PDF or UC-TransAdmin-EN.PDF if you want to learn more about translation system setup and coordination.
    If your system does not yet run on a Unicode basis, you must make the
    technical adjustments described on the first page of the documentation.
    If yours is already a Unicode system, create an OSS message and assign it to the component BC-DOC-TTL.
    Should you have to translate from a Business Warehouse (BW) environment, please refer to the Quick Guide to generating worklists in transaction SLWB attached to this note (files QuickGuideTransAdmin-DE.PDF or QuickGuideTransAdmin-EN.PDF).
    Regards,
    Naveen.

  • Fonts for printing - unicode or non-unicode

    Hi, How could i find whether the fonts am using for scripts and smartforms are unicode compatible or not.
    Regards,
    Vijayalakshmi

    Hello Kyle,
    thank you very much.
    I have think that I can install the j2ee engine unicode or non unicode. And I can install SAP EP with unicode or non unicode.
    There is a cd from SAP its named "NON_Unicode_INST_Master_CD".
    In this cd it gives a path "IM08_SOLARIS_64/SAPINST/UNIX/SUNOS_64".
    And there is a sapinst. With this sapinst I can install a portal.
    Is this portal then a unicode installation, although it is placed on the "NON_Unicode_INST_Master_CD"?
    Regards,
    Werner

  • Peoplesoft convert Oracle non-unicode database to unicode database

    I am following doc 1437384.1 to convert a Peoplesoft database from non-unicode database to unicode database
    I use the following export statement (as user PS)
    SET NO TRACE;
    SET OUTPUT output_file.dat;
    SET NO DATA;
    EXPORT *;
    And the following import statement (as user sysadm)
    SET NO TRACE;
    SET NO DATA;
    SET INPUT output_file;
    SET LOG log_file;
    SET UNICODE ON;
    SET STATISTICS OFF;
    SET ENABLED_DATATYPE 9.0;
    IMPORT *;
    Before I do the datapump import, I am comparing the objects
    SQL> select object_type, count(*) from dba_objects where owner = 'SYSADM' group by object_type order by 1 asc;
    OBJECT_TYPE COUNT(*)
    INDEX 33797
    LOB 2775
    TABLE 28829
    TRIGGER 9
    VIEW 21208
    on oracsc63 (targetdb):
    SQL> select object_type, count(*) from dba_objects where owner = 'SYSADM' group by object_type order by 1 asc;
    OBJECT_TYPE COUNT(*)
    INDEX 23748
    LOB 2170
    TABLE 19727
    I don't have the same number of object. When I do the import this means that around 10000 tables will not have the UTF-8 format.
    Any ideas how I can solve this? How has experience with this peoplesoft conversions?

    Hello Jacques,
    please check sapnote #808505 (Secondary connection to Oracle DB w/ different character set).
    Regards
    Stefan

Maybe you are looking for