Muttng and putty drawing characters

So, this has been bugging me for a time and I can't ever figure out the exact reason this happens.
When I use putty to connect to a remote server (with TERM set to xterm-256color) and load up muttng, I get drawing characters that look like this
Note the 'x's should be vertical lines and the 'mq' should be horizontal lines... but nope.
I've tried messing with the fonts to no avail. Putty is set to UTF-8 mode with unicode line drawing chars, and my locale is UTF-8 enabled.
This does *not* happen to be a problem with 'mc' (which uses slang for drawing) however, so I don't think it's a drawing issue in general. I expect it's ncurses only...
Any ideas?

Hmmm interestingly enough, this seems to be caused by setting putty to utf-8 mode. If I switch putty back to latin1, I get appropriate drawing characters.
Anyone know why that is?

Similar Messages

  • [SOLVED] terminals & line drawing characters problem

    I use quite some escape sequences in my bash prompt, amongst them a few that produce line drawing characters. Works fine in the virtual consoles (tty), but no terminals in X (tried xterm, terminal, urxvt) display them correctly, for some reason. My locale settings seem fine, and I've tried various fonts (including the one I use in the virtual consoles).
    What could the issue be?
    FYI, my bash prompt variable. Does it display correctly for you?
    DRED='\e[0;31m'
    DGREEN='\e[0;32m'
    DYELLOW='\e[0;33m'
    DBLUE='\e[0;34m'
    DPURPLE='\e[0;35m'
    DCYAN='\e[0;36m'
    DWHITE='\e[0;37m'
    LRED='\e[1;31m'
    LGREEN='\e[1;32m'
    LYELLOW='\e[1;33m'
    LBLUE='\e[1;34m'
    LPURPLE='\e[1;35m'
    LCYAN='\e[1;36m'
    LWHITE='\e[1;37m'
    COLRESET='\e[0m'
    PS1="\n\[$DBLUE\]\[\016\]l\[\017\]\[$DRED\](\u@\h)\[$DBLUE\]\[\016\]qqq\[\017\](\[$LBLUE\]H\!\[$DBLUE\])\[\016\]qq\[\017\](\[$LBLUE\]C\#\[$DBLUE\])\[\016\]qq\[\017\](\[$LBLUE\]J\j\[$DBLUE\])\[\016\]qqq\[\017\](\[$LBLUE\]\D{%H:%M %A %d - %B %Y}\[$DBLUE\])\n\[\016\]t\[\017\]\[\016\]q\[\017\](\[\[$LBLUE\]\w\[$DBLUE\])\n\[\016\]mqq\[\017\]> \[$LBLUE\]"
    Last edited by Mzg (2010-07-09 10:00:41)

    After some detective work I have managed to come up with an explanation as well as what seems to be a working solution.
    If you have not tried the prompt above, basically I tried to use some line drawing characters in my bash prompt, but these refused to display correctly under any X terminals I tried (though it looked fine on virtual consoles).
    The problem was in the
    \[\016\] ... \[\017\]
    sequences. The \016 escape sequence is supposed to enter the alternate character set mode (common way to draw e.g. lines in text mode) while \017 returns the terminal to the standard character set. These work fine on the virtual consoles, but are apparently a no-no in (some) X terminals. If you tried the prompt you would notice that the color escape sequences worked fine, only the line drawing characters failed.
    So that is the explanation part. So for the solution...
    For urxvt, which is my preferred terminal emulator, the solution is quite simple. This should also work with other rxvt-derived terminals (including the popular aterm), though I have not tested this.
    These terminals offer the same functionality as the virtual consoles, though the escape sequences are different. "\033(0" enters alternate charset mode while "\033(B" returns to standard charset mode. So the solution is simply to replace all previous
    \[\016\] ... \[\017\]
    sequences with
    \[\033(0\] ... \[\033(B\]
    But this poses a problem, as the virtual consoles do not recognize these sequences and you'll get the same problem as before, only in text mode instead of X. I solved this by using the PROMPT_COMMAND variable to run fgconsole every time a command is ran in bash, checking if the command is ran in tty7 (i.e. X11) or in one of the (other) virtual consoles. This is my code for the root prompt:
    DRED='\e[0;31m'
    DGREEN='\e[0;32m'
    DYELLOW='\e[0;33m'
    DBLUE='\e[0;34m'
    DPURPLE='\e[0;35m'
    DCYAN='\e[0;36m'
    DWHITE='\e[0;37m'
    LRED='\e[1;31m'
    LGREEN='\e[1;32m'
    LYELLOW='\e[1;33m'
    LBLUE='\e[1;34m'
    LPURPLE='\e[1;35m'
    LCYAN='\e[1;36m'
    LWHITE='\e[1;37m'
    COLRESET='\e[0m'
    function prompt_func
    # Running in tty7 or larger (X11)
    if [ `sudo fgconsole` -gt 6 ]
    then
    PS1="\n\[$DBLUE\]\[\033(0\]l\[\033(B\]\[$DRED\](\u@\h)\[$DBLUE\]\[\033(0\]qqq\[\033(B\](\[$LBLUE\]H\!\[$DBLUE\])\[\033(0\]qq\[\033(B\](\[$LBLUE\]C\#\[$DBLUE\])\[\033(0\]qq\[\033(B\](\[$LBLUE\]J\j\[$DBLUE\])\[\033(0\]qqq\[\033(B\](\[$LBLUE\]\D{%H:%M %A %d - %B %Y}\[$DBLUE\])\n\[\033(0\]t\[\033(B\]\[\033(0\]q\[\033(B\](\[\[$LBLUE\]\w\[$DBLUE\])\n\[\033(0\]mqq\[\033(B\]> \[$LBLUE\]"
    else
    PS1="\n\[$DBLUE\]\[\016\]l\[\017\]\[$DRED\](\u@\h)\[$DBLUE\]\[\016\]qqq\[\017\](\[$LBLUE\]H\!\[$DBLUE\])\[\016\]qq\[\017\](\[$LBLUE\]C\#\[$DBLUE\])\[\016\]qq\[\017\](\[$LBLUE\]J\j\[$DBLUE\])\[\016\]qqq\[\017\](\[$LBLUE\]\D{%H:%M %A %d - %B %Y}\[$DBLUE\])\n\[\016\]t\[\017\]\[\016\]q\[\017\](\[\[$LBLUE\]\w\[$DBLUE\])\n\[\016\]mqq\[\017\]> \[$LBLUE\]"
    fi
    PROMPT_COMMAND=prompt_func
    Note that I do not claim to be a good bash programmer, so there might be better ways. This has however worked flawlessly so far, including when su'ing to other users, and switching between tty's and X.
    The code is the same for my other users, except from the colors. Note the
    `sudo fgconsole`
    Sudo proved necessary for non-root users. I added an entry in the sudoers config file to let all users run fgconsole as root without providing a password.
    Okay, that's it. It's a bit dirty, but it solved my problem at least.
    Last edited by Mzg (2010-07-10 07:06:44)

  • Draw figures from a xml and then draw anothers when I click on them

    This is what I have to do:
    I got a XML file with the info of a drawing: circles, rectangles.....
    I read the file and I draw the figures on a JPanel.
    And now what I have to do is this:
    When I click on a figure I have to recognize what figure is, for example, rectangle number 2 on the XML file. Then I have to read the XML and foud what I have to draw when I click on that figure, this info is on the XML:
    <Transition Rectangle="2" NextDraw="Rectangle 3" />
    How do I draw all these figures and keep the info I need (name and number of the figure)? And how do I manage mouse events for recognize the click on a figure for draw anothers.
    Sorry for my bad english and thanks

    I don't know the structure of your XML file.
    Anyway, I guess it's something like the following :
    shapes.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <shapes>
         <Transition Rectangle="1" NextDraw="Rectangle 2" />
         <Transition Rectangle="2" NextDraw="Rectangle 3" />
         <Transition Rectangle="3" NextDraw="Circle 1" />
         <Transition Circle="1" NextDraw="Circle 2" />
         <Transition Circle="2" NextDraw="Circle 3" />
         <Transition Circle="3" />
    </shapes>Here the java code. Plz, take a look at it and adapt it to your needs.
    XMLParserHandler.java
    import java.util.HashMap;
    import java.util.Map;
    import org.xml.sax.Attributes;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.helpers.DefaultHandler;
    public class XMLParserHandler extends DefaultHandler {
         Map<String, String> shapes;
         public XMLParserHandler(){
              shapes = new HashMap<String, String>();
         public void startDocument() throws SAXException {
              //System.out.println("Start Shapes Document.xml");
              shapes = new HashMap<String, String>();
         public void endDocument() throws SAXException {
              //System.out.println("End Shapes shapes.xml");
         public void startElement(String uri, String localName, String qName,
                   Attributes attributes) throws SAXException {
              //System.out.println("Start Element : " + qName);
              //display(attributes);
              if("TRANSITION".equals(qName.toUpperCase())){
                   String key = null;
                   String value = "";
                   int n = attributes.getLength();
                   String attrName;
                   for (int i = 0; i < n; i++) {
                        attrName = attributes.getQName(i);
                        if(! "NEXTDRAW".equals(attrName.toUpperCase())){
                             key = new String(attrName+" "+attributes.getValue(i));
                        }else{
                             value = new String(attributes.getValue(i));
                   if(key!=null){
                        shapes.put(key.toUpperCase(), value.toUpperCase());
         public void endElement(String uri, String localName, String qName)
                   throws SAXException {
              //System.out.println("End Element : " + qName);
         public void characters(char[] ch, int start, int length)
                   throws SAXException {
              //System.out.println(new String(ch, start, length));
         public void error(SAXParseException e) throws SAXException {
              throw e;
         public void fatalError(SAXParseException e) throws SAXException {
              throw e;
         public Map<String, String> getShapes() {
              return shapes;
         private void display(Attributes attrs){
              int n = attrs.getLength();
              for (int i = 0; i < n; i++) {
                   System.out.println("***"+attrs.getQName(i)+" = "+attrs.getValue(i));
    MyPanel.java
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Shape;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.geom.Ellipse2D;
    import java.awt.geom.Rectangle2D;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Map;
    import javax.swing.JPanel;
    public class MyPanel extends JPanel {
         static String CIRCLE = "CIRCLE";
         static String RECTANGLE = "RECTANGLE";
         public List shapeList;
         int currentIndex = 0;
         Shape currentShape;
         public MyPanel(Map shapes, String entry) {
              createShapeList(shapes, entry);
              addMouseListener(new MyMouseListener());
         private String getShapeName(String value){
              return value.split("\\s+")[0];
         private void createShapeList(Map shapes, String entry){
              shapeList = new ArrayList();
              Shape shape=null;
              String key = new String(entry);
              String value ;
              int i=0;
              do{
                   value=getShapeName(key);
                   System.out.println(value);
                   if(CIRCLE.equals(value)){
                        shape = new Ellipse2D.Double(5, 5+40*i, 20, 20);
                        System.out.println("==> added circle");
                   }else if(RECTANGLE.equals(value)){
                        shape = new Rectangle2D.Double(5, 5+40*i, 20, 20);
                        System.out.println("==> added rectangle");
                   shapeList.add(shape);
                   key = (String)shapes.get(key);
                   i++;
              }while(value!=null&&value.trim().length()>0);
              currentShape = (Shape)shapeList.get(currentIndex);
         class MyMouseListener extends MouseAdapter{
              public void mouseClicked(MouseEvent e) {
                   int x = e.getX();
                   int y = e.getY();
                   if(currentShape.contains(x, y)){
                        if(currentIndex<shapeList.size()-1){
                             currentIndex++;
                             currentShape = (Shape)shapeList.get(currentIndex);
                             repaint();
         public void paint(Graphics g) {
              Graphics2D g2 = (Graphics2D) g;
              g2.setPaint(Color.red);
              for (int i = 0; i < currentIndex+1; i++) {
                   g2.fill((Shape)shapeList.get(i));
    Main.java
    import java.io.File;
    import java.util.Map;
    import javax.swing.JFrame;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    public class Main {
         public static void main(String[] args) {
              SAXParserFactory spf = SAXParserFactory.newInstance();
              SAXParser parser;
              Map myShapes = null;
              try {
                   parser = spf.newSAXParser();
                   XMLParserHandler handler = new XMLParserHandler();
                   parser.parse(new File("shapes.xml"), handler);
                   myShapes = handler.getShapes();
                   String entry = "RECTANGLE 1";
                   //Create and set up the window.
                   JFrame frame = new JFrame("MyFrame");
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   // Create and set up the content pane.
                   MyPanel newContentPane = new MyPanel(myShapes, entry);
                   newContentPane.setOpaque(true); // content panes must be opaque
                   frame.setContentPane(newContentPane);
                   // Display the window.
                   frame.setSize(400, 400);
                   frame.setResizable(false);
                   frame.setVisible(true);
              }catch(Exception e){
                   e.printStackTrace();
    NB: as mentioned in the Main class (see main method), you should provide the main entry for your xml file : String entry = "RECTANGLE 1";Hope That Helps

  • Draw characters on the screen

    As we draw circles and other graphics, is there any way to
    draw characters on the screen or print characters on the
    screen?

    Do you mean you want to render Text with the drawing API?
    If so, there's no native way to do that, but it can be done
    by capturing a bitmapData copy of a TextField's contents and using
    it in a BitmapFill.
    But its much easier to use Degrafa with RasterText:
    http://www.degrafa.org/blog/2008/11/rastertext-for-advanced-text-graphics/

  • Dynamic Images in PDF and Escaping Special Characters

    I used the following to create my own PDFs with dymnamic images:
    http://marcsewtz.blogspot.com/2012_02_01_archive.html (Dynamic Images in PDF - What 32k Limit? )
    I have installed this application on Oracle's free workspace to test.
    The issue I am having is that when there is a special character in the description, such as <>'"& then the the PDF will not open. I have tried using the dmbs_xmlgen.convert to convert the description but haven't had any luck.
    I'm a complete novice with xml. Any help with this is greatly appreciated.
    Thanks,
    Glen

    I have been able to find a solution, but it's not completely perfect. I have changed the "description" field as follows:
    XMLCdata(replace(description,''&'',''and'')) description,
    The characters greater than (>), less than (<), single qoute('), and double quote (") can now all be in the description and will not cause errors. For some reason, I couldn't get the & not to give an error no matter what I tried, so I just replaced the & with the word "and". This solution will work for my needs, but it would be nice to be able to get the & to display.
    Does anyone know of a way to get the & to display correctly?
    Thanks again,
    Glen
    The complete code I am using is below:
    declare
    l_print_layout clob;
    l_xml_data clob;
    begin
    -- load print layout from database
    for c1 in (
    select layout from eba_pdfimg_layouts where id = :P1_LAYOUT
    ) loop
    l_print_layout := wwv_flow_utilities.blob_to_clob(c1.layout );
    end loop;
    -- generate XML data
    for c2 in (
    select dbms_xmlgen.getxml('
    select
    id,
    file_name,
    mime_type,
    XMLCdata(replace(description,''&'',''and'')) description,
    -- description,
    blob2clobase64(image,''Y'') image
    from eba_pdfimg_images
    ') xml_data from dual
    ) loop
    l_xml_data := c2.xml_data;
    end loop;
    -- download print document
    wwv_flow.g_page_text_generated := true;
    apex_util.download_print_document (
    p_file_name => 'image_demo',
    p_content_disposition => 'ATTACHMENT',
    p_report_data => l_xml_data ,
    p_report_layout => l_print_layout,
    p_report_layout_type => 'rtf',
    p_document_format => :P1_FORMAT
    end;

  • I use classical Hebrew for my work, and Pages will only display English characters even with a Hebrew font selected. If I cut and paste Hebrew characters from another document, as long as the font is supported, it will appear in Pages.  If I type it won't

    I use classical Hebrew for my work, and Pages will only display English characters even with a Hebrew font selected. If I cut and paste Hebrew characters from another document, as long as the font is supported, it will appear in Pages.  If I type it won't continue in Hebrew.  I have tried downloading several fonts, including those from professional societies, but the only way to get Hebrew in my document is to cut and paste.  Does anyone know how to fix this?  I use an older MacBook running OS 10.9.1.  I used to do my Hebrew work in Word, but it is no longer supported by Mac OS.

    Just clarifying:
    Pages '09 has bad support for Hebrew, Arabic etc but will accept pasted text.
    Pages 5 has much better support but with bugs.
    If you have columns they are in the wrong order ie Text starts in the left column and ends in the right column.
    If you type English into Hebrew text it tends to fall in the wrong position eg instead of to the left of Hebrew punctuation it goes to the right.
    As Tom recommends the only real solution on the Mac is Mellel.
    Peter
    btw Tell Apple, they are amazingly slow to fix this running sore which has been broken since RtoL was supposedly introduced in OSX 10.2.3 over a decade ago.
    Peter

  • How do i restore default text/font settings for fire fox?Text is not displaying correctly some letters not dark and see odd characters inplace of letters in words

    How do i restore my text so that all words are uniform in darkness?Now some letters are fragmented or missing a part of it and see odd characters instead of letters in some sentences.Ive tried different fonts in the Options still the same.Would like to
    be able to restore my default settings for text/fonts.Would that eliminate this problem?

    Try to set the Boolean pref <b>gfx.font_rendering.directwrite.use_gdi_table_loading</b> to <i>false</i> on the <b>about:config</b> page.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold (user set).
    *Preferences can be reset to the default via the right-click context menu if they are user set
    *Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean)

  • Getting rid of single quotes and other bad characters

    Hello All-
    I am writing a servlet that takes a value from a form, and saves it to a database. However, when single quotes, and other illegal characters are entered, i get all sorts of errors. I am certain their is some function that would take care of all of this.
    Help!

    Hi there,
    When you try to insert single quotes into the database it gives an error or problem because a single quote is a reserved character in the database.
    If you want to store a single quote or any other character that is reserved in the database then you need to find out how to escape that reserved character.
    One option is to use the single quote twice, so instead of ' , use '' (not double quote but , type single quote twice).
    Another option is to use HTML entity code for single quote
    "Message was edited by:
    appy77

  • Cannot Input and Display Chinese Characters by using ODBC Applications

    Dear all,
    I am trying to input the Simplified Chinese Characters in the Oracle Database Ver 9.2 running on a UNIX AIX server. The client application we are using is th MS Access 2003 running on a MS Windows XP English version SP 2 without multi-language pack. MS Office 2003 is also an English version.
    Database setting is:
    NLS_CHARACTERSET=US7ASCII
    NLS_NCHAR_CHARACTERSET=AL16UTF16
    The Oracle Client used is also ver 9.2 with the ODBC driver ver 9.2. I have tried the following NLS_LANG settings by chaging the registry without any NLS_LANG environment settings:
    AMERICAN_AMERICA.ZHT16MSWIN950
    AMERICAN_AMERICA.ZHS16GBK
    AMERICAN_AMERICA.ZHT16HKSCS
    AMERICAN_AMERICA.AL32UTF8
    I have tied to load some Chinese Characters in by sqlload and by using the NLS_LANG AMERICAN_AMERICA.ZHT16MSWIN950, AMERICAN_AMERICA.ZHS16GBK and AMERICAN_AMERICA.ZHT16HKSCS, they can be display perfectly in SQLPLUS. But when using the same NLS_LANGs and display in the ACCESS, only ???? are displayed.
    When I tried to insert Chinese in ACCESS, the character changed to ???? again. No matter what Chinese characters I inserted by MS ACCESS, the ???? code can be dump with the binary code "03, 0f".
    Are there any methods or settings I need to change to make ACCESS an application for inserting and displaying Chinese characters from the Oracle database?
    I have tried to set the Non-Unicode setting in the Windows Locale setting:
    Chinese (Taiwan) (With AMERICAN_AMERICA.ZHT16MSWIN950),
    Chinese (Hong Kong S.A.R) (with AMERICAN_AMERICA.ZHT16HKSCS) and
    Chinese (PRC) (with AMERICAN_AMERICA.ZHS16GBK)
    when inserting the Chinese Characters by Access. But they all failed with ???? inserted in the DB.
    Please kindly advise what should be done.
    Thanks.

    Are you trying to store the character data in char/varchar2 columns?
    If that's the case then you have a problem, since a US7ASCII character set can only handle, well, ascii data.
    If you are trying to store the data in columns of nchar datatypes, then there might be a problem with literals because literals are converted to database character set first, before conversion to national (nchar) character set. Such data loss can also happen depending on how binds or oci calls are performed.
    You could use the dump() function to verify what's actually stored in a database column, without a db - client conversion happening that may distort the facts.
    Example:
    SQL> select col, dump(col, 1016) from table where some_condition;

  • Find and Replace Japanese characters in pdf file on iPhone

    Hi eveybody !
    I want to find and replace Japanese characters in pdf on iPhone.
    I using zlib to deflate stream - endstream block and extract text.It's work fine with latin-text.
    But when i work with japanese characters , I don't know how to do it ?
    I decode a sample japanese pdf file, and I know that each Japanese characters are performances as hex string : "<01b7><0e230a23>..."
    But i don't know how to convert Japanese characters to the hex string like that.
    Can evrybody help me?
    Thanks!

    Searching is the same process as extracting - since it's about turning page content into something understandable.  So that still remains what you need to learn/understand - of course, referring back to all the previous sections about font formats, etc.
    Replacing in PDF is EXTREMELY DIFFICULT for two reasons - subset fonts and explicit glyph positioning.  Have you determine (conceptually, if nothing else) how you plan to addresses these two issues?
    PDF doesn't do UTF8 for page content - so don't worry about that.

  • Inserting strings of printable and non printable characters

    I would very much appreciate some help with the following
    To handle an interface with a legacy system I need to create strings containing both printable and non-printabel ascii characters. And with non printable characters I mean in particular those in the range of ASCII 128 to 159.
    It seems it is not possible to insert a string containting both printable and not printable characters from the afore mentioned range into a VARCHAR2 table column as the following demonstrates:
    insert into test values(chr(156)); -- this inserts the 'œ' symbol.
    SQL> select test, ascii(test), length(test), substr(test,1,1), ascii(substr(test,1,1))from test;
    TEST       ASCII(TEST) LENGTH(TEST) SUBSTR(TEST,1,1) ASCII(SUBSTR(TEST,1,1))
    ┐                  156            1That the the character mapped is shown as '┐' and not 'œ' is not really issue for my application, what is important is that the ASCII value is shown as 156, which is the ASCII code of the character I inserted.
    What is however strange (actually probably not strange but has to do with the lack of understanding of the issue at hand) is that substr returns an empty string...
    Now I try to insert a concatenated string, first the "non printable" character then a printable character
    insert into test values(chr(156)||chr(65));
    SQL> select test, ascii(test), length(test), substr(test,1,1), ascii(substr(test,1,1))from test;
    TEST       ASCII(TEST) LENGTH(TEST) SUBSTR(TEST,1,1) ASCII(SUBSTR(TEST,1,1))
    A                   65            1 A                                     65For some reason the not printable character (chr(156)) is now not inserted or at least does not appear when I selected the data from the table, this effect seems to apply to all characters in the range of ASCII 128 to 159 (tried some but not all) However for instance CHR(13) can be inserted as part of a string as shown above .
    For our application I really don't care much what character is shown or not show, what is important is that I can retrieve the ASCII value and that this value matches the one I inserted which for some reason does not seem to work.
    This seems to be, at least to some extent a character set issue. I have also tested this on a database with character sets set as follows
    NLS_CHARACTERSET
    WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET
    AL16UTF16
    With WE8MSWIN1252 the described issue does NOT occur, however unfortunately I must use NLS_CHARACTERSET AL32UTF8 which produces the results as described above!
    As said any insights would be much appreciated as I am slowly but surely starting to despair.
    For completions sake, character sets are set as follows (changing it is NOT an option):
    NLS_CHARACTERSET
    AL32UTF8
    NLS_NCHAR_CHARACTERSET
    AL16UTF16
    The test table is created as follows
    CREATE TABLE TEST
    TEST VARCHAR2(1000 BYTE)
    Database Version 11.2.0.3.0
    Edited by: helios.taraba on Dec 2, 2012 10:18 AM --Added database version
    Edited by: helios.taraba on Dec 2, 2012 10:24 AM Added description of test results using NLS_CHARACTERSET WE8MSWIN1252

    Hello Orafad,
    Thanks for your reply, at least I understand the effects I'm seeing i.e.
    +"For multibyte character sets, n must resolve to one entire code point. Invalid code points are not validated, and the result of specifying invalid code points is indeterminate."+
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions026.htm
    You are absolutely right I could use chr(50579) to get the ligature symbol. However as what we are trying to achieve is to implement a legacy interface to a 20+ years old subsystem we are actually not so much interested in the symbol itself but rather in the ascii value of that symbol (156 as you so rightly point out in the win-1252 characterset), this particular field represents the lenght of the message being sent to the subsystem and can vary from decimal 68 to 164 and is also considered in a checksum calculation which is part of the message.
    As changing the nls_characterset of the database is not an option I guess I only have one reasonable avenue to resolve this namely to push the functionality to added the "encoded" length of the message (and the calculation of the checksum) to the java driver which is responsible for sending the message (tcp/ip) to the subsystem. Here we should not have any issues adding a byte with the value 156 (or any other for that matter) to the datastream.
    Thankfully all other fields have characters with ascii values below 128 and above 31.
    I'm going to leave my question as un-answered for a bit longer in the hopes of someone coming up with a golden bullet, although not getting my hopes up.
    Thanks, Helios

  • How to connect any scanner and cash draw box in retail outlets

    we have JHS 10g oem copy.how can connect with barcode scanner and cash draw box, print invoice over the JHS? is it any pre defined ADF application available in Oracle for retails?

    we have been developing ADF application,we pause development? due to the  connection with cashdraw devices( Point of Sale Devices) over the JSF pages! this is our core issue! how can achieve this goal?
    we have 40+ outlets with CashDrawer with bar-code scanner! those devices should communicate with our ADF application!
    either any such type of devices are compatible with ADF application.please suggest,we can buy.

  • I have a manual that contains headings and index entries that contain less than and greater than characters, and . The Publish to Responsive HTML5 function escapes these correctly in the main body of the text but does not work correctly in either the C

    I have a manual that contains headings and index entries that contain less than and greater than characters, < and >. The Publish to Responsive HTML5 function escapes these correctly in the main body of the text but does not work correctly in either the Contents or the Index of the generated HTML. In the Contents the words are completely missing and in the index entries the '\' characters that are required in the markers remain in the entry but the leading less than symbol and the first character of the word is deleted; hence what should appear as <dataseries> appears as \ataseries\>. I believe this is a FMv12 bug. Has anyone else experienced this? Is the FM team aware and working on a fix. Any suggestions for a workaround?

    The Index issue is more complicated since in order to get the < and > into the index requires the entry itself to be escaped. So, in order to index '<x2settings>' you have to key '\<x2settings\>'. Looking at the generated index entry in the .js file we see '<key name=\"\\2settings\\&gt;\">. This is a bit of a mess and produces an index entry of '\2settings\>'. This ought to be '<key name=\"&amp;lt;x2settings&amp;gt;\" >'. I have tested this fix and it works - but the worst of it is that the first character of the index entry has been stripped out. Consequently I cannot fix this with a few global changes - and I have a lot of index entries of this type. I'm looking forward to a response to this since I cannot publish this document in its current state.  

  • Unicode line-drawing characters - possible Java bug?

    Hi all, I am trying to draw a box using line drawing characters in UTF-8. I make the UTF-8 box file in Microsoft Word where it looks aligned. However, when I run my Java program to display the box in a JTextArea, it is all out of alignment like below. Is this a bug in Java that prevents it from displaying aligned line-drawing characters? I am tearing my hair out over this so your help is much appreciated.
    Regards,
    Rianmal.
    &#9556;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9559;
    &#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;
    &#9553; &#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9562;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9565;

    sabre,
    Looks like monospaced isn't found on windows (vista)... So I used "Courier New" instead.
    Sabre20090412a.java is saved with encoding=UTF-8 (i.e. CP1252) instead of the default ASCII, which doesn't support the extended characters.
    package forums;
    import java.awt.Font;
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    public class Sabre20090412a
      private static final String text;
      static {
        String t;
        t =  "&#9556;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9559;\n"; // LINE 12
        t += "&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;\n";
        t += "&#9553;                   &#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9562;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9565;\n"; // LINE 23
        text = t;
      public static void createAndShowGUI() {
        final JFrame frame = new JFrame("Test");
        final JTextArea ta = new JTextArea();
        ta.setFont(new Font("Courier New", Font.PLAIN, 14)); // <<<<< Note font-name="Courier New"
        ta.setText(text);
        frame.setContentPane(ta);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            createAndShowGUI();
    build (NOTE the -encoding utf-8)*
    cd /d C:\Java\home\src\forums
    "C:\Program Files\Java\jdk1.6.0_12\bin\javac.exe" -encoding utf-8 -Xlint -d C:\Java\home\classes -cp c:\java\home\src;.;C:\Java\home\classes C:\Java\home\src\forums\Sabre20090412a.java
    run
    cd /d C:\Java\home\src\forums
    "C:\Program Files\Java\jdk1.6.0_12\bin\java.exe" -cp C:\Java\home\classes forums.Sabre20090412a
    References:
    http://www.google.com/search?q=warning%3A+unmappable+character+for+encoding+Cp1252&hl=en
    http://en.wikipedia.org/wiki/Windows-1252 #says 1252== IANIA UTF-8 except
    http://www.utf8-chartable.de/unicode-utf8-table.pl #page for 2500 onwards
    http://forums.sun.com/thread.jspa?threadID=5185338 #-encoding
    http://www.java2s.com/Code/Java/2D-Graphics-GUI/Listallavailablefontsproviedinthesystem.htm
    Roedy Green rocks!
    http://mindprod.com/jgloss/font.html#AVAILABLEJ
    http://mindprod.com/applet/fontshower.html
    Thanx for the fish!
    Cheers. Keith.

  • Does any one know of software that you can import a PDF and then draw  on it, dimensions, notes and symbols...technical drawing?. Blue beam have the perfect software for this BUT it's not Mac compatible

    Does any one know of software that you can import a PDF and then draw  on it, dimensions, notes and symbols...technical drawing?. Blue beam have the perfect software for this BUT it's not Mac compatible

    You need a PDF editor, at the high end use Adobe's Acrobat Professional, at the low end use the editing features in Preview (pre-loaded on your iMac). However you should probably look at the Mac App Store, you will find many of PDF editing applications. You simply need to find one that suits your needs.

Maybe you are looking for

  • Apps keep turning cellular data on

    I keep turning off data for most of my apps so that I can only use them on wifi but lately some pass keep turning their cellular data on. I try to turn it off again but they always manage to turn it back on after I leave my settings

  • Ipod Touch video screenshot

    Hello everyone I would like to do with my ipod touch a video screenshot. Is it possible ?

  • Oracle 10g RAC on solaris 10 installation

    hi i want to know the default file location of following: oracle base oracle home control files redo log files data files plz tell me exactly the default path for all the above

  • Different rows of a view in Physical Layer and Presentation Services

    Hi all From Administration tool you I have the view <View_Name> which has 3165 rows after Update Rows command. The same number of rows is even when i make a simple select in TOAD: Select count(*) from <View_Name> The simple report has only three fiel

  • No synchronisation between iPhone & Icloud (music)!?

    Hello, I have used iTunes match to bring all my music to the icloud. It works excellent. Now I have all information on 3 devices ( iPAD 1; new iPAD, iPhone 4 (my wife)), but there is no synchronistaion between my iphone 4 and the icloud. I do it like