Printing Unicode characters

Hi all,
I am trying to print certain unicode characters to a file using this code:
import java.io.*;
public class Unicode{
     public static void main(String args[]) throws IOException{
          char[] c = new char[1];
          char ch= '\u0ce6'; //starting character
          File f = new File("c:\\UC.txt");
          BufferedWriter bf = new BufferedWriter(new FileWriter(f));
          while( ch < '\u0cef'){
               c[0] = ch++;
               bf.write(c, 0, 1);//write the character to a file
          bf.flush();
}All I can see in the file is '?????????'. I tried printing it to file as command prompt also showed the same thing. How can I see the Unicode characters of different languages? Do I need to set any char encoding using System properties?
Thank you very much.

Sigh there is no such thing as plain text.
You create a file with the platform encoding (read the API docu of the FileWriter). That platform encoding is probably not even able to represent all unicode characters (it's likely to be ISO-8859-1 or one of it's variants).
Then you open that file without specifying the character set (it's guessed, possibly wrong) and you don't see the expected output.
Read http://www.joelonsoftware.com/articles/Unicode.html for an introduction into the beautiful world of unicode.

Similar Messages

  • Printing unicode characters in Java - help

    Hi there,
    I want to print out unicode characters through java programming language in windows system. For example, I want to print Devanagari characters. I found out that '\u0900' to '\u0975' represent devanagari characters. So I tried following,
    out = new PrintStream(System.out, true, "UTF-8");
    out.println('\u0911');
    but they print characters like ��� and not the actual devanagari characters. Just to be more clear, devanagari script is used by Hindi, Nepali and similar languages.
    If you knew about it and could give any suggestions, that would be very helpful.
    Thanks in advance!

    priyankabhar wrote:
    I am not sure, it is just a windows system and I am trying to print to the command line. Please suggest me how I can find out if my console supports it.Use the CHCP command to find out what code page your console uses. And as already suggested, Google is a good resource if you don't know what a "code page" is.

  • Printing Turkish Characters in SAP Script Form

    Hi I want to print a Form where I need to Print Turkish characters from Database. Its Print Preview is coming absolutely right but there is some problem while printing. I shows # symbol in places of Turkish Characters. I have checked the printer and drivers and they are absolutely fine. Printer is printing other documents in Turkish Language but not the form. System has Turkish fonts installed. Kindly help. Thanks in advance.

    Hi
    See this OSS note for your problem
    OSS Note: 776507
    Symptom
    Documents printed via SAPscript or SmartForms do not print with correct special characters, e.g. ### prints instead of Japanese or Russian characters. What to do?
    Other terms
    SAPscript, SmartForms, printing, device types, OTF
    Reason and Prerequisites
    Help required to choose proper fonts in a SAPscript or SmartForm
    Solution
    When using SAPscript or SmartForms to print (or email or fax) a form from a business application, many factors influence the outcome of the actual text within the form. All these factors must be checked in order to ensure a correct printout:
    1) The language version of the form used to produce the printout.
    Example: If you want to print a French invoice, you need to have a FR version of your SAPscript or SmartForms invoice form RVINVOICE01. And the application program must specify the corresponding language key (FR) when calling the SAPscript or SmartForms API.
    2) The font selections specified in the form (possibly also in a SAPscript style or SmartStyle used in a form).
    Example: In a SAPscript form or a SmartStyle you need to specify HELVE if you want to print German text in Helvetica (or similar) font. If you want to print Japanese text, HELVE is not a valid choice but you need to specify a Japanese font like JPMINCHO in your Japanese form.
    3) The output character set of the device type
    Every printer in transaction SPAD has a "device type" assigned. Device types used by the spooler for printing support only one single specific output character set. All text from the form has to be converted (using SAP's built-in character conversion mechanism) to this output character set.
    A character set can typically support either a single language (e.g. Shift-JIS which supports only Japanese) or a set of languages (e.g. ISO 8859-1, which supports Western-European languages). It is possible that a given language (such as German) can be supported by several output character sets, e.g. you may use either ISO 8895-1 (Latin-1) or ISO 8859-2 (Latin-2) to represent German text. This is so because both character sets contain the special characters used in German.
    Example: HPLJ4000 is a HP LaserJet device type supporting the ISO 8859-1 (Latin-1) character set. ISO 8859-1 can be used to represent e.g. Dutch, English, French, German, Spanish, Swedish but NOT Russian or Japanese.
    As a consequence, it is ok to use HPLJ4000 to print English, German French etc. but not for Japanese or Russian.
    4) The set of available printer fonts for a given device type
    When formatting a document, SAPscript and SmartForms perform an automatic mapping of the font definitions in the form (e.g. "HELVE 14 point bold") and the available printer fonts of the device type. A replacement printer font is chosen, should the specified font selection not be available in the device type. Now this replacement can be problematic if a language-specific font, such as Chinese CNSONG, is specified in a form and it gets replaced by a font which does not support this language, e.g. COURIER.
    To solve this problem, font families in SE73 have language attribute assigned, e.g. some fonts are characterized as being suitable only for certain languages. And when a replacement has to be chosen because the original font from the form is not available in the device type, a replacement font is chosen which has the same language attributes.
    If no fonts for the language in question exist in the device type, the resulting font will not be able to print the special characters and you will see "wrong" output characters in the printout.
    Note on SAPscript/SmartForms Print Preview:
    The OTF Print Preview available in Windows GUI (e.g. from transaction SP01) will sometimes not show the "wrong" characters which appear on the final printout. Here is the reason: since the Print Preview runs in Windows environment, it will use Windows fonts to represent the actual printer fonts. A Windows font typically has more available characters (i.e. covers more character sets) than are actually available in a printer's resident font.
    A typical example where the Print Preview will differ from the printout is here: if you have a Chinese PCL5 printer such as CNHPLJ4 and use the Western Latin font COURIER in your document, the print preview will show you Chinese characters if you (by accident) tried to format Chinese characters in COURIER font. This is because Windows will automatically choose a font that can output Chinese characters (which is actually not Courier). But when you print the job on an actual PCL5 printer with resident Western and Chinese fonts, the Courier font will not print any Chinese characters but Western special characters instead, because the printer's resident Courier font does not include Chinese characters.
    Rule of thumb: all Asian device types (e.g. CNHPLJ4, JPHPLJ4, JPPOST, KPHPLJ4) support not only Asian fonts but also COURIER, HELVE and TIMES fonts. But these Latin fonts can only be used to print English text, not Chinese/Japanese/Korean characters.
    Which fonts are suitable for a given language?
    Language(s):            Font family to use in a form:
    Latin-1 (Western Europe/Americas) *******
    DE,EN,FR,ES,NL,SV       COURIER, HELVE, TIMES
                            (LETGOTH, LNPRINT)
    Latin-2 (Central Europe) ****************
    PL, CZ                  COURIER, HELVE, TIMES
    ISO 8859-4 (Baltic) *********************
    ET, LT, LV              COURIER, HELVE, TIMES
    ISO 8859-5 (Cyrillic) *******************
    BG, RU, SR, UK          COURCYR, HELVCYR, TIMECYR
    ISO 8859-7 (Greek) **********************
    EL                      COUR_I7, HELV_I7, TIME_I7
    ISO 8859-8 (Hebrew) *********************
    HE                      COURIER, HELVE, TIMES
    ISO 8859-9 (Turkish) ********************
    TR                      COURIER, HELVE, TIMES
    Simplified Chinese **********************
    ZH                      CNHEI, CNKAI, CNSONG
    Japanese ********************************
    JA                      JPMINCHO, DBMINCHO, DBGOTHIC
    Korean **********************************
    KP                      KPBATANG, KPDODUM, KPGULIM
                            KPGUNGSE, KPSAMMUL
    Traditional Chinese *********************
    ZF                      TWDPHEI, TWMING, TWSONG
    Thai ************************************
    TH                      THANGSAN, THDRAFT, THVIJIT
    Arabic (Unicode systems only) ***********
    AR                      ANDALE_J
    Verify your output by examining the OTF data
    When analysing printing problems of this type, be sure to check the OTF data which gets produced by SAPscript or SmartForms. OTF or "Output Text Format" is the intermediate page-description format generated from SAPscript or SmartForms. OTF will contain the final printer font names and character set/language identifiers which help to solve the problem. OTF will even name the form and the language of the form used to create the output.
    The easiest way to do this is to create a spool request from your application, run transaction SP01, use menu
    Goto->Display Requests->Settings
    and choose
    Display Mode: Raw
    Now display your spool request. If this is a SAPscript or SmartForms spool request, you will see OTF data. Each line represents one OTF command, every command starts with a 2-character cmd identifier and possibly some cmd parameters follow.
    Here is an excerpt from a sample OTF file where we highlight the most interesting commands:
    //XHPLJ8000    0700 00000000001
    IN04EALEXTEST_ZEBRA
    IN05%PAGE1
    OPDINA4  P 144  240 1683811906000010000100001
    IN06%WINDOW2
    MT0024401289
    CP11000000E
    FCHELVE  120  00109XSF100SF101110000067E X
    UL +0000000000000
    SW00067
    CT00000000
    ST0453037Dieses SF hat Stil ALEXTEST_ZEBRA mit
    The 1st line with the // (Control) command reveals the device type usedto print: HPLJ8000
    //XHPLJ8000    0700 00000000001
    The 2nd line (IN = Info command) shows the name and (internal 1-char)language key of the form:
    IN04EALEXTEST_ZEBRA
    In this case it is the English (E = EN) SmartForm ALEXTEST_ZEBRA
    The OP-line (OP = Open Page) gives the page format used in the form, it is DINA4 Portrait orientation:
    OPDINA4  P 144  240 1683811906000010000100001
    The CP (CodePage) cmd shows the SAP system codepage used to code the text and the active language. In our case it is codepage 1100 and language E = EN = English.
    CP11000000E
    Finally, the FC-cmd (Font Call) lists a printer font selected within SmartForms. Please note that every SmartForm has a designated default SmartStyle under "Form Attributes->Output Options". In addition, every text node can have a SmartStyle attached (which will override the definitions from the default style for the text). In our case the resulting printer font that was selected is HELVE 12.0 pt bold-off, italic-off.
    FCHELVE   120  00109XSF100SF101110000067E X
    Header Data
    Release Status: Released for Customer
    Released on: 22.08.2005  09:57:20
    Priority: Recommendations/additional info
    Category: Customizing
    Primary Component: BC-CCM-PRN Print and Output Management
    Secondary Components: BC-SRV-SCR SAPscript
    BC-SRV-SSF Smart Forms
    <b>
    Reward points for useful Answers</b>
    Regards
    Anji

  • Is there a list of Unicode characters that can be used in Acrobat bookmarks?

    I can add Greek characters to Acrobat bookmarks using hexadecimal strings. For example, to print a lower case gamma symbol I use <FEFF03B3>. FEFF is the required Unicode flag and 03B3 is the Unicode code for gamma. This works fine. However, there are no Unicode entries for greek characters in the PDF 32000-1:2008 PDF Specification manual. Table D.2 - PDFDocEncoding Character Set on page 656 lists Unicode characters and these also work when added to bookmarks but no Greek codes are in this table. Since I can sucessfully use Greek Unicode characters in the range of 0x0391 - 0x03CE and these characters are not listed in the PDF manual I am assuming there are additional Unicode character that will work in bookmarks. Therefore, I am looking for a complete list of Unicode characters that can be used in Acrobat's bookmarks. Does such a list exist?

    Thank you for the response.
    I'm sorry to hear there is no list available. I'm building the Acrobat bookmarks automatically. The input data contains entity codings (for example, a lower case Greek gamma is coded as &#x03B3;) and I was hoping to be able to just pass these through with an automatic conversion to a hexadecimal string (for example <FEFF03B3>). If I had a list of valid Unicode characters, that will display in an Acrobat bookmark, I could validate each entity before the conversion and catch the ones that won't display correctly. I know these types of characters are out there because I have already come across them. For example, a superscript 5 (0x2075) displays fine in MSWord but shows as a white box in a bookmark. Now I'll need to proof the output PDFs and look for white boxes in the bookmarks so that I can build my list of unicode characters that do not work in Acrobat bookmarks.
    Again, thanks for your help.

  • SAPSCRIPT: Printing international characters on ZEBRA; How to do?

    Hi,
    I use software NiceLabel software to design barcode forms. I upload the design to so10 Sapscript text and print it on the Zebra ptinter. I used device tape ASCIIPRI. The SAP system is unicode.
    Now I need to print chinese pallet labels and I get unexpected problems. I found a lot information but no solution. Is it possible to print international charcters form SAPScript on Zebra?
    I got the information from Zebra's White Paper: Solution for Printing International Characters. There it says:
    "Unicode UTF-8 is embedded within Zebra printers."
    "SAP Forms can be universal. Labels and forms ... do not need to be modified or recreated to print in different languages."
    "SAP-developed UTF-8 device type and code page support for SAPscript users"
    "Label design software that can generate ZPL with support for Unicode ZPL commands"
    Do you now which device type I have to use? I think I need an UTF-8 device type. Do you know how to go on?
    Please help. Thanks
    Frank

    Hi Frank,
    as far as I know, it might be possible when using SMARTFORMS instead of SAPScript!
    In that case, it depends of the device type and the printer type, of course.
    Have a look on SAP Note 750002 SmartForms: Support für Zebra Etikettendrucker (ZPL2).
    Cheers
    Klaus

  • Direct Execution of query having Unicode Characters

    Direct Execution of query having Unicode Characters
    Hi All,
    In my application I am firing a Select Query having Unicode characters in Where Clause under condition like '%%'
    to Oracle 10g DB from a Interface written in VC6.0...
    Application funcationality is working fine for ANSI characters and getting the result of Select properly.
    But in case of Unicode Characters in VC it says 'No Data Found'.
    I know where the exact problem is in my code. But not getting the exact solution for resolving my issue...
    Here with I am adding my code snippet with the comments of what i understand and what i want to understand...
    DBPROCESS Structure used in the functions,_
    typedef struct
    HENV hEnv;
    HDBC hDbc;
    HSTMT hStmt;
    char CmdBuff[[8192]];
    char RpcParamName[[255]];
    SQLINTEGER SpRetVal;
    SQLINTEGER ColIndPtr[[255]];
    SQLINTEGER ParamIndPtr[[255]];
    SQLPOINTER pOutputParam;
    SQLUSMALLINT CurrentParamNo;
    SQLUSMALLINT OutputParamNo;
    SQLUSMALLINT InputParamCtr;
    SQLINTEGER BatchStmtNo;
    SQLINTEGER CmdBuffLen;
    short CurrentStmtType;
    SQLRETURN LastStmtRetcode;
    SQLCHAR SqlState[[10]];
    int ShowDebug;
    SQLCHAR* ParameterValuePtr;
    int ColumnSize;
    DBTYPE DatabaseType;
    DRVTYPE OdbcDriverType;
    BLOCKBIND *ptrBlockBind;
    } DBPROCESS;
    BOOL CDynamicPickList::GetResultSet(DBPROCESS *pDBProc, bstrt& pQuery, short pNumOdbcBindParams, COdbcBindParameter pOdbcBindParams[], CQueryResultSet& pQueryResultSet)
         int               lRetVal,
                        lNumRows;
         bstrt               lResultSet;
         wchar_t               lColName[[256]];     
         SQLUINTEGER          lColSize;
         SQLSMALLINT          lColNameLen,
                        lColDataType,
                        lColNullable,
                        lColDecDigits,                         
                        lNumResultCols;
         wchar_t               lResultRow[[32]][[256]];
    OdbcCmdW(pDBProc, (wchar_t *)pQuery); *//Query is perfectly fine till this point all the Unicode Characters are preserved...*
         if ( OdbcSqlExec(pDBProc) != SUCCEED )
              LogAppError(L"Error In Executing Query %s", (wchar_t *)pQuery);          
              return FALSE;
    Function OdbcCmdW_
    //From this point have no idea what is exactly happening to the Unicode Characters...
    //Actually i have try printing the query that gets stored in CmdBuff... it show junk for Unicode Characters...
    //CmdBuff is the Char type Variable and hence must be showing junk for Unicode data
    //I have also try printing the HexaDecimal of the query... I m not getting the proper output... But till i Understand, I think the HexaDecimal Value is perfect & preserved
    //After the execution of this function the call goes to OdbcSqlExec where actual execution of qurey takes place on DB
    SQLRETURN OdbcCmdW( DBPROCESS p_ptr_dbproc, WCHAR      p_sql_command )
         char *p_sql_commandMBCS;
         int l_ret_val;
         int l_size = wcslen(p_sql_command);
         int l_org_length,
    l_newcmd_length;
    p_sql_commandMBCS = (char *)calloc(sizeof(char) * MAX_CMD_BUFF,1);
    l_ret_val = WideCharToMultiByte(
                        CP_UTF8,
                        NULL,                         // performance and mapping flags
                        p_sql_command,          // wide-character string
                        -1,                         // number of chars in string
                        (LPSTR)p_sql_commandMBCS,// buffer for new string
                        MAX_CMD_BUFF,                    // size of buffer
                        NULL, // default for unmappable chars
                        NULL // set when default char used
    l_org_length = p_ptr_dbproc->CmdBuffLen;
    l_newcmd_length = strlen(p_sql_commandMBCS);
    p_ptr_dbproc->CmdBuff[[l_org_length]] = '\0';
    if( l_org_length )
    l_org_length++;
    if( (l_org_length + l_newcmd_length) >= MAX_CMD_BUFF )
    if( l_org_length == 0 )
    OdbcReuseStmtHandle( p_ptr_dbproc );
    else
    strcat(p_ptr_dbproc->CmdBuff, " ");
         l_org_length +=2;
    strcat(p_ptr_dbproc->CmdBuff, p_sql_commandMBCS);
    p_ptr_dbproc->CmdBuffLen = l_org_length + l_newcmd_length;
    if (p_sql_commandMBCS != NULL)
         free(p_sql_commandMBCS);
    return( SUCCEED );
    Function OdbcSqlExec_
    //SQLExecDirect Requires data of Unsigned Char type. Thus the above process is valid...
    //But i am not getting what is the exact problem...
    SQLRETURN OdbcSqlExec( DBPROCESS *p_ptr_dbproc )
    SQLRETURN l_ret_val;
    SQLINTEGER l_db_error_code=0;
         int     i,l_occur = 1;
         char     *token_list[[50]][[2]] =
    {     /*"to_date(","convert(datetime,",
                                       "'yyyy-mm-dd hh24:mi:ss'","1",*/
                                       "nvl","isnull" ,
                                       "to_number(","convert(int,",
                                       /*"to_char(","convert(char,",*/
                                       /*"'yyyymmdd'","112",
                                       "'hh24miss'","108",*/
                                       "sysdate",     "getdate()",
                                       "format_date", "dbo.format_date",
                                       "format_amount", "dbo.format_amount",
                                       "to_char","dbo.to_char",
                                       "to_date", "dbo.to_date",
                                       "unique","distinct",
                                       "\0","\0"};
    char          *l_qry_lwr;  
    l_qry_lwr = (char *)calloc(sizeof(char) * (MAX_CMD_BUFF), 1);
    l_ret_val = SQLExecDirect( p_ptr_dbproc->hStmt,
    (SQLCHAR *)p_ptr_dbproc->CmdBuff,
    SQL_NTS );
    switch( l_ret_val )
    case SQL_SUCCESS :
    case SQL_NO_DATA :
    ClearCmdBuff( p_ptr_dbproc );
    p_ptr_dbproc->LastStmtRetcode = l_ret_val;
    if (l_qry_lwr != NULL)
         free(l_qry_lwr);
    return( SUCCEED );
    case SQL_NEED_DATA :
    case SQL_ERROR :
    case SQL_SUCCESS_WITH_INFO :
    case SQL_STILL_EXECUTING :
    case SQL_INVALID_HANDLE :
    I do not see much issue in the code... The process flow is quite valid...
    But now i am not getting whether,
    1) storing the string in CmdBuff is creating issue
    2) SQLExecDirect si creating an issue(and some other function can be used here)...
    3) Odbc Driver creating an issue and want some Client Setting to be done(though i have tried doing some permutation combination)...
    Any kind of help would be appreciated,
    Thanks & Regards,
    Pratik
    Edited by: prats on Feb 27, 2009 12:57 PM

    Hey Sergiusz,
    You were bang on target...
    Though it took some time for me to resolve the issue...
    to use SQLExecDirectW I need my query in SQLWCHAR *, which is stored in char * in my case...
    So i converted the incoming query using MultibyteToWideChar Conversion with CodePage as CP_UTF8 and
    then passed it on to SQLExecDirectW...
    It solved my problem
    Thanks,
    Pratik...
    Edited by: prats on Mar 3, 2009 2:41 PM

  • Terminal.app and the European Unicode characters?

    Does anyone have the unicode characters working properly in Terminal.app?
    If I try to write in GNU nano 1.2.4 for instance "örrör" it translates into:
    (one empty line)
    örr
    ör
    which isn't certainly right. This is especially awkward when editing an unicode text file where the text then easily becomes more or less garbled. Usually more.
    It doesn't seem to make any difference whether or not I use the Finnish extended (unicode) keyboard layout or the conventional one in nano. If the Terminal.app window preferences are set as UTF-8, it says:
    ?rr
    ?r
    which looks even more garbled.
    In plain bash the characters print like this:
    å = \345
    ä = \344
    ö = \366
    so my mighty apple translates the example string "örrör" as "\366rr\366r".
    Any ideas, anyone?
    PowerBook G4 @ 1.5 GHz   Mac OS X (10.4.4)   1.25 GB DDR SDRAM
    Debian Sarge 3.1 as a slave fetchmail server.

    Hi solarflare,
       My first (and essentially only) language is English as well. However enough folks have asked that I have experimented with multibyte characters. There are so many apps and options involved, it's difficult to get consistent results. However, I'll recount as many settings as I can recall.
       To begin with, you are right about the LC settings. It helps many apps to have:
    export LCALL=enUS.UTF-8
    export LANG=en_US.UTF-8
    set in your shell startup scripts. Then the system should be set to produce unicode when you type. In the "Input Menu" tab of the "International" pane of "System Preferences", you should select a unicode keyboard layout, such as U.S. Extended.
       To configure the Terminal, you need to open the "Terminal Inspector" by selecting "Window Settings..." in the "Terminal" menu. To type many multibyte characters, you need the option key. To use it, you must have the "Use option key as meta key" checkbox unchecked, although I find the meta key too important in UNIX to leave that unchecked. In the dropdown menu in the "Display" pane of the "Terminal Inspector", you should set the "Character Set Encoding" to "Unicode (UTF-8)". In the "Emulation" pane of the same window, you must uncheck the "Escape non-ASCII characters" checkbox. That is important as I've read that it is checked by default and that can produce some pretty strange results.
       Now it's helpful to use a very modern shell. For instance, the latest beta version of zsh-4.3 has the best unicode support of all versions of zsh. After you've chosen a good shell, you're at the mercy of the application that you're using. As I gather you've noticed, vim has excellent unicode support and picks up on the LC settings. I have no idea about nano but it is meant to be a minimal text editor.
       I know that my settings allow me to type extended characters and the "Character Palette" lets me insert more. As far as other command line utilities go, the best you can do is to choose well and keep your apps as up-to-date as possible. Fink or Darwin Ports can often help in that regard.
    Gary
    ~~~~
       This generation doesn't have emotional baggage.
       We have emotional moving vans.
             -- Bruce Feirstein

  • Printing Khmer characters correctly, with ligature substitutions

    I'm trying to implement printing of characters from the Khmer writing system. The characters and the font are both Unicode and using the font in other applications works fine. However in Java, using the Java 2D printing, the characters are not printed correctly. It appears that the ligatures are not placed in the proper location. I have a sample application that shows the problem. I'm looking for help to either found out if this is a bug in Java or if I'm missing the obvious.
    I've search the Java forums and can't find much on this topic. Please point me.
    PS. I can't see away to attach my sample. If you think that would be helpful say so and I'll paste it inline to this thread.

    I found that my problem can be solved by using a different font. In my tests I had used the Khmer OS * fonts and if I replaced the font with [Kh System.ttf|http://sourceforge.net/projects/khmer/files/Fonts%20-%20KhmerOS/Kh%20Uni%20fonts%20for%20design%20pro./ ] and ran my test program and I get the expected results.

  • Printing Chinese Characters in Smart Forms

    Hi,
    Iu2019m trying to print Chinese characters via smart forms. However during print preview or print, all Chinese characters are showing as # symbols.
    I have researched and implemented for some possible solutions posted in the forum like:
    a.) Setting the regional language control panel.
    b.) Activating the multi-byte function in I18N.
    c.) Checked the output device is SWINCF.
    d.) Control parameter language is ZH (Chinese).
    Unfortunately it still doesnu2019t solve the problem. Any input is highly appreciated.
    With regards,
    Marc

    Remark following basics:
    Forms:
    Language of the form must be: "ZH".
    Due to a SAPNOTE only font family CN* (CNSONG etc.) is mapped.
    For frontend print, you must install chinese true type on you local PC and print via "CNSAPWIN" .
    For backend print, you must install neccesaary fonts in your printer to the resident fonts. You must use a printer like "CNHPL4" or so.
    For PDF archiving, you must upload truetype fonts to application server -> basis guys.
    Cascading Fonts:
    If you mix different subfonts to unicode areas, you must use CNSAPWINCF.
    Until now, only frontend printing is available.
    Note:
    Spool created for back end print with print preview is only a simulation of getting a picture of the output created with front end technology. So it can differ, when the printer does not have the resident fonts.
    Regards,
    Christian

  • How to print unicode in SAPscript

    hi gurus,
    I am now having a problem in printing uinicode in printing ( printer HP LaserJet 4250 PCL 6) with SAPscript. Although i have changed the font in SAPscript text ( paragraph format ) , but when i print out , the font does not change , coul you please help me this
    Thanks ,

    Let me tell you how to print double digit character in printer.
    Usually, all ENGLISH characters are single digit characters and they can be printed on ordinary printer.
    Now coming back to double digit character Japanese, chinese, Vitanamese, some special symbols etc. for printing this characters unicode enabled printer is must.
    Usually, you can ask your basis team to enable unicode to your printer, all they need is some additional hard disk, they will be setting your printer in SAP.
    Note: Until unless you enable unicode (HP LaserJet 4250 PCL 6) it acts as an ordinary printer.
    Reward points if useful.
    Regards,
    SaiRam

  • Unable to print chinese characters

    Hello experts,
    A script is triggered when i run the transaction FBL5N and a form is printed.
    The issue is, i am unable to see the chinese text in the preview as well as print.
    The chinese characters appers as ###, check boxesor some other symbols.
    Tried chaging the priner settings also(ouput device and device type)
    Tried changign the font family aslo.(CNKAI and CNHEI)
    The functional consultant says using the existing priner settings they are able to print chinese characters through some other transactions like VF03
    Waiting for positive responses.
    Regards
    Akmal

    See [note 302228 - NLS trouble shooting: printing (collective note)|http://service.sap.com/sap/support/notes/302228]: Characters on printout printed as nothing, #, ?, ., box, other character. It contains a detailed procedure how to analyze and solve. See also note 753381 which contains a Word document (attachment) with a more detailed classification of character damage.
    By the way, do you log in SAP in Chinese, do you have a Unicode system, do you use frontend printing, does your computer have Asian support installed, is the font installed on your computer?

  • Additional CR when printing unicode character

    Hello,
    the following code prints two lines on a printer. The second line contains an escaped unicode character. When running the example code I can't even see the unicode character on the paper; but in my original application it is visible. So this is not the problem. But always an additional carriage return is inserted after the unicode character, thus overprinting the beginning of the line with the remaining text. This did not occur in java 6 if I remember correctly. Is there any workaround for this?
    Regards
    J.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import javax.swing.*;
    public class HelloWorldPrinter implements Printable, ActionListener {
        public int print(Graphics g, PageFormat pf, int page) throws
                                                            PrinterException {
            if (page > 0) return NO_SUCH_PAGE;
            Graphics2D g2d = (Graphics2D)g;
            g2d.translate(pf.getImageableX(), pf.getImageableY());
            g.drawString("Hello world!", 100, 100);
            g.drawString("Now the line with a unicode \u2259 character.", 100, 120);
            return PAGE_EXISTS;
        public void actionPerformed(ActionEvent e) {
             PrinterJob job = PrinterJob.getPrinterJob();
             job.setPrintable(this);
             boolean ok = job.printDialog();
             if (ok) {
                 try {
                      job.print();
                 } catch (PrinterException ex) {
                      System.out.println(ex);
        public static void main(String args[]) {
    //        UIManager.put("swing.boldMetal", Boolean.FALSE);
            JFrame f = new JFrame("Hello World Printer");
            f.addWindowListener(new WindowAdapter() {
               public void windowClosing(WindowEvent e) {
               System.exit(0);
            JButton printButton = new JButton("Print");
            printButton.addActionListener(new HelloWorldPrinter());
            f.add("Center", printButton);
            f.pack();
            f.setVisible(true);
    }

    Hello Sabre,
    thank you for testing. Of course it's good news that you don't see any overprinting, but unfortunately that doesn't help me on my site (Win7 64-Bit, java 1.7.0_09).
    Since I can see the character in my original application as I wrote, I made up the following test case and met a strange behaviour. I can make my desired unicode character appear without any overprinting as long as I don't use any other character in the string below 2000(16).
    Kindly run the following code. It prints a line of unicode characters starting with my desired one.
    Then change iConstant in makeTextLine() to any value below 0x2000. At my site this results in overprinting.
    Does it also happen at yours?
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import javax.swing.*;
    public class UnicodeTest extends JFrame implements Printable {
      String text= "Test line with unicode \u2259 character.";
      public UnicodeTest() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(350, 200);
        text= makeTextLine();
        JLabel lb= new JLabel("<html>Printing started...<br>"+text);
        add(lb);
        setVisible(true);
        PrinterJob printerJob= PrinterJob.getPrinterJob();
        printerJob.setPrintable(this);
        try {
          printerJob.print();
        catch (PrinterException e) {
          System.out.println("PrinterException: "+e);
      public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
          public void run() {
         new UnicodeTest();
      public String makeTextLine() {
        StringBuilder sb= new StringBuilder();
        int iStartValue= 0x2259;
        int iConstant= 0x2020; // Tested with 0x100, 200, 400, 800, 1000, 2000.
        for (int i=iStartValue; i<iStartValue+30; i++) {
          sb.append((char)i);
          sb.append((char)iConstant);
        return sb.toString();
      public int print(Graphics g, PageFormat pf, int page) throws
                                                            PrinterException {
        if (page > 0) return NO_SUCH_PAGE;
        Graphics2D g2d = (Graphics2D)g;
        g2d.translate(pf.getImageableX(), pf.getImageableY());
        g2d.setFont(new Font("Dialog", Font.PLAIN, 12));
        g.drawString(text, 50, 40);
        return PAGE_EXISTS;
    }

  • ZHANWIN device type does not print Korean characters

    Hi All,
    We are trying to print smart forms containing Chinese,Taiwanese and Korean characters from our ECC 6.0
    As per SAP Note 1038413 - Unicode SAPWIN device type for CJK fon, we used the device type ZHANWIN to print smart forms for these characters. 
    But with this device type we are unable to print smart forms with Korean characters. But as per the note, it has to support Korean characters too.
    Please help with this issue.
    Thanks and Regards,
    Subashree

    Hi Subashree,
    it is likely that the problem with ZHANWIN is related to the font used in the form. if you want to print Korean characters via ZHANWIN, you need to specify a Korean font like KPBATANG for the Korean characters in the form. Then this will be mapped to a suitable windows font in windows. If you chosse e.g font COURIER , it is mapped to windosw font Courier New which does nto contain the Korean characters.
    For SWINCF or SWINCFCK the font in SAP is not so impertant. The mapping of the characters in windows is based on the Unicode character range. So as Nils said, SWINCFCK should work regardless of the font in the SAP form.
    Regards,
    Aidan

  • Device Type to print Vietnamese Characters

    Hi Gurus,
    I can print Vietnamese characters in a laser printer using the device type SWINCF and Access Method F (Frontend printing).
    Now I want to print using Access Method U (Print using Berkeley Protocol) in a network printer (located overseas). I am using a unicode device type ZHPUTF8F because our SAP system is running under Unicode (ECC 6.0). Unfortunately the printout for the Vietnamese characters are wrong (garbage characters). Is it possible to print Vietnamese characters using a device type other than SWINCF? The printer model that I am testing with is HPLJ 4250.
    One more thing, we will be needing to print using a dot matrix printer. Is there a specific device type that can print Vietnamese characters for dot matrix printer (e.g. Printronix)?
    Thanks,
    Andre

    Hi Andre,
    did you check SAP note 750219 that all listed prerequisites are met ?
    Regarding other printers and Unicode support, please have a look at:
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1015a496-94d5-2b10-3c8e-845ff55480c0
    or apply SAP note 1036961.
    Best regards,
    Nils Buerckel
    SAP AG
    Edited by: Nils Buerckel on Mar 19, 2010 5:09 PM

  • Printing Hungarian characters fails on Zebra Printer

    Hi guys,
    we are trying to print hungarian characters like the unicode U+0150 (LATIN CAPITAL LETTER O WITH DOUBLE ACUTE). I have loaded the latest Zebra drivers into our ECC 6.0, loaded the Swiss 721 Font into the printer, but still it doesn't work. Right now I'm a little stuck on the topic, the last thing I have tried was to change the codepage of the printer driver, but even when I use the one that works with our laser printers, the characters aren't printed or they are replaced by other characters in the codepages. Can anyone help us quite fast ;-)?
    Regards,
    Michael

    Hi Micheal,
    we are also facing same problem..
    when we raised note to SAP.. this is the response we got..
    After consulting with SAP, I found out that our SAP system doesnu2019t support printing Hungarian characters because our SAP system configuration uses CP8000 which is single codepages.  CP8000 doesnu2019t support Latin2 characters. Hungarian is in Latin2 group.
    To be able to print Hungarian characters, we need to switch to Unicode system configuration.
    see the below Links it may help for some ...
    Hungarian Character Printing problem
    Problem in displaying special chars
    Prabhudas

Maybe you are looking for

  • Get-Childitem with millions of files

    Hello all, My task is to create a report with all subfolders in a given path, sorted after the newest LastWriteTime on any file in the folder. The ultimate reason is to determine which folders have been unused for long enough to move to offline stora

  • Im just curiious about connecting a ipod to mac and windows

    hi guys i have a windows and a mac comp and im just curious if i format (restore) my ipod on my windows will it ALSO read and do everything it should on a mac? thanks guys!

  • HT201364 Can't download OS X Maverick due to space!

    I am trying to download OS X Maverick and I have 5.25 GB available, but the message I am receiving is "You need 4.95 GB available space on your startup disk" and it will not allow me to download. Any help out there regarding making more space or some

  • Aperature Import - storing files in their current location

    I imported my archive of photos from my server into Aperture while continuing to store my files in their current location. I noticed about 5 folders were skipped. (I have them organized in years back to 1968, and only 5 years didn't import) All have

  • How to Sync my 8900 with my Mac

    Can anyone tell me how to get my BB to sync with my Mac. I have 10.4 on my Mac and have sync my BB once to get contacts onto it but, it will not complete a sync update again. It get to contacts and does not go futher. I am using pocketMac and have do