How to open different character encoding texts ?? plsss

first off all... I'm sorry for my English mistakes (if they really exist) because I'm from Brazil..
I want to know how to open texts with different encoding (ANSI, unicode, e UTF -8).
I have an application, and I open texts on a JEditorPane, it works normal when it's an ANSI text, but when it's unicode the text appears with some strange character in spaces and end of line..
thanks for all

Your English is better than my Portugese. ;-)
I think you're looking for the setContentType method.

Similar Messages

  • Why differing Character Encoding and how to fix it?

    I have PRS-950 and PRS-350 readers, both since 2011.  
    In the last year, I've been getting books with Character Encoding that is not easy to read.  In playing around with my browsers and View -> Encoding menus, I have figured out that it has something to do with the character encoding within the epub files.
    I buy books from several ebook stores and I borrow from the library.
    The problem may be the entire book, but it is usually restricted to a few chapters, with rare occasion where the encoding changes within a chapter.  Usually it is for a whole chapter, not part, and it can be seen in chapters not consecutive to each other.
    It occurs whether the book is downloaded directly to my 950 reader or if I load it to either reader from my computer(s), which are all Mac OS X of several versions fom 10.4 to Mountain Lion.  SInce it happens when the book is downloaded directly, I figure the operating system of my computer is not relevant.
    There are several publishers involved, though Baen (no DRM ebooks) has not so far been one of them.
    If I look at the books with viewers on the computer, the encoding is the same.  I've read them in Calibre, in the Sony Reader App, and in Adobe Digital Editions 2.0.  It's always the same.
    I believe the encoding is inherent to the files.  I would like to fix this if I can to make the books I've purchased, many of them in paper and electronically, more enjoyable to read on my readers.
    Example: I’ve is printed instead of I've.
    ’ for apostrophe
    “ the opening of a quotation,
    â€?  for closing the quotation,
    and I think — is for a hyphen.
    When a sentence had “’m  for " 'm at the beginning of a speech (when the character was slurring his words) it took me a while to figure out how it was supposed to read.
    “’Sides, â€™tis only for a moon.  That ain’t long.â€?
    was in one recent book.
    Translation: " 'Sides, 'tis only for a moon. That ain't long."
    See what I mean? 
    Any ideas?

    Hi
    I wonder if it’s possible to download a free ebook with such issue, in order to make some “tests”.
    Perhaps it’s possible, on free ebooks (without DRM), to add fonts by using softwares like Sigil.

  • How to open Adobe Media Encoder CS5 in Windows

    Please excuse my ignorance but how do you open Adobe Media Encoder?  I've searched everywhere and cannot find a solution.  In Adobe help,it says it's in the start menu under all programs but all I have been able to find is a folder with a bunch of dll files.  If I try to export a clip from Premiere Pro, It doesn't open, no error message or anything, simply nothing happens.  I found an update but that still didn't do anything, still no luck in finding it.  Thanks in advance for any feedback. 

    On my computer folder structure is...
    Program Files... Adobe... Adobe Media Encoder CS5
    Includes (along with a lot of dll files)
    Adobe Media Encorer.exe dated 8/6/2010 size 1,848 kb

  • How to include different Character Sets in Flex AIR project

    Hi All,
    Flex, AIR(Desktop) Project.
    PROBLEM Scenario:
    My Application needs a path from Windows registry, So I am launching a .cmd file using Native Process API.
    As a result I get a text file with the path.
    So, everything works fine(reading/writing), but if the path contains different languages like Korean, Chinese then the READING OPERATION IS FAILED only when I install the application. It works fine while debugging.
    (By failing I mean its not getting the characters, its printing some junk values.)
    I am using readMultibyte & writeMultibyte APIs, and I am assiging the character set dynamically as per the OS language. (Which is Enslish in current scenario)
    FINDING:
    I installed Windows with Korean Language on a system, so now if I build the .exe on this machine then it works fine. So, i guess its not able to get the Korean Character set from the English OS, thats why it failed in earlier case.
    Is there any way to include different character sets in a Flex project?
    Regards,
    Mayank

    Some loaded SWFs may not be compatible with Flex.  Try making a simpler SWF (like one that just draws a circle where you click) and see if it can be loaded and interacted with.
    -Alex

  • How to open a Character mode report in report designer 2.5

    I am trying to open a character mode reoprt in Report Designer 2.5 and .. getting an error message:
    Waring: Character-mode report 'XYZ' is being opened as bit-mapped report.
    Warning: Page width of report '<report name>' changed to fit the font for a character cell. Might be a consequence of font-mapping.
    Is thier any way to open Character-mode report in Report Designer 2.5
    Report is designed for AR module.
    Thanks,

    ACCOUNTING SYSTEM
    2006-2007 From Date : 01-JUL-06
    Printed On : Friday August 31 2007 11:13 AM To Date : 30-SEP-07
    G A/C. Code 99-99-9999 Description: xxxxxxxxxxxxx H
    -- DOC. # -- -- DATE -Chq/Slip# ---------- N A R R A T I O N -- -- DEBIT -- -- CREDIT -- -- BALANCE --
    Opening Balance: -999,999,999.00 Cr.
    G *** Total *** 0.00 0.00 -999,999,999.00H
    ================= ================= =================
    when i run character mode report in browser then display this output properly
    but sir problem is that when i print the report
    G(use for bold)
    is not working
    means not print in bold format in printer
    same character print G
    do you have any idea when i print through browser to printer G for bold purpose its work to printer ?

  • How to use the character encoding model to use ' �'  in java

    hi
    I have to use the special characters like '�' using java.but when '�' character is transferred to data base or is displayed in my form,it is shown as '?'.but i need to display the original characters in the form of what it is.
    what can i do as i expects the result .i needs it very urgently.so reply to me as soon as possible.
    advance thank you
    rgds
    Oasisdeserts

    Java stores all characters as 16 bit UNICODE (which has plenty of room far more exotic characters than Greek). Every time character data is brought into, or stored from the Java environment it passes through a specific character encoding. If you don't state the encoding explicitly it uses the default encoding of the machine it's running on (which is typically oriented to the language set in the locale.).
    With a database the database driver is supposed to do any necessary translation. The non-latin character could be stored wrongly, the database could be returning it wrongly or whatever's creating your form could be interpretting it wrongly, or lack the capacity to display the character.
    If it's, say, a JSP try setting the page encoding to UTF-8. Try dumping the characters read from the database in HEX and look them up at www.unicode.org.
    Take a look at the database setup information, some have an option of storing characters as UNICODE or ASCII.
    The "?" is substituted whenever a codec can't make sense of the codes it's translating, either the byte array is invalid or the UNICODE character can't be represented.

  • How to query for foreign encoded text via REST service

    I am using APEX 4.2.1.00.08 to publish RESTful web services that query a table of place names. The place names include foreign encoded alternates. My search field has type of NVARCHAR2 and the db has NLS_CHARACTERSET of AL32UTF8. Querying for foreign encoded names works fine from other applications (e.g. TOAD, ArcGIS).
    In APEX under 'SQL Workshop | RESTful Services' I have created a module, resource template, and resource handler. When I use 'Set Bind Variables' to test the service, it works for 'English' names with no problem (e.g. 'London').
    However, when I query for a foreign equivalents like 'ロンドン', the Japanese version of 'London', I get the following error:
    400 - Bad Request
    The request path contains illegal characters
    How do I get foreign encoded place names to work as the bind variable value of a REST service?

    Does this query help?
    select /*+ parallel(4) */
    pk.table_name parent_table_name, pk.constraint_name pkey_constraint,
    fk.table_name child_table_name, fk.constraint_name fkey_constraint, fk.r_constraint_name
    from
    user_constraints pk,
    user_constraints fk
    where
    pk.constraint_name = fk.r_constraint_name
    and pk.constraint_type='P'
    and fk.constraint_type='R'

  • How to set XML character encoding for a SOAP response?

    Hi,
    We're using Oracle J2EE web services,
    and are quite happy with them.
    However, it's a problem that we need to have
    characters outside the standard English alphabet
    in our service responses. So far, we have not been
    able to find a way to specify what encoding to use.
    Our version (9.0.3 release) produces SOAP-responses
    without any encoding specification in the XML header.
    Any ideas?

    Hello,
    If you are using the "Paper Layout", check the Reports's "Before Report Value" property:
    Before Report Value :
    <meta http-equiv="Content-Type" content="text/html; charset=&Encoding">
    If you are using the "Web Layout", take a look to the document :
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_nls.htm#i1006142
    18.3 Specifying a Character Set in a JSP or XML File
    Regards

  • How to read UTF-8 encoded text file randomly?

    I am trying to read a text file which has been encoded in UTF-8. The problem is that I need to access the file randomly. The RandomAccessFile is a low-level class and there seems to be no-way to wrap it in InputStreamReader so that UTF-8 encoding can be done on-the-fly. Is there any easy way to do that. Below is the simplified version of my program.
    import java.io.*;
    public class Test{
            public Test(String filename){
                    try{
                            RandomAccessFile rafTemIn = new RandomAccessFile(new File(filename), "r");
                            while(true){
                                    char chr = rafTemIn.readChar();
                                    System.err.println(chr);
                    } catch (EOFException e) {
                            System.err.println("File read.");
                    } catch (IOException e) {
                            System.err.println("File input error");
            public static void main(String[] args){
                    Test t= new Test("template.idx");
    }

    The file that I am going to read could be few hundreds of MBs or GBs. Hence, I will index interesting items in the file. The index file contain the keyword and the byte offset in the file. So, I will need to seek to any byte to read it. The file could be UTF-8 encoded XML or UTF-8 encoded plain text.
    Also, would like to add-up that in the sample program above I am reading the file sequentially. The concerned class has another method which actually does the reading randomly. If this helps, I am pasting the simplified version of code again but this also includes the said method.
    import java.io.*;
    public class Test{
            long bloc;
            long eloc;
            RandomAccessFile rafTemIn;
            public Test(String filename){
                    bloc=0L;
                    eloc=0L;
                    try{
                            rafTemIn = new RandomAccessFile(new File(filename), "r");
                            while(true){
                                    char chr = rafTemIn.readChar();
                                    System.err.println(chr);
                    } catch (EOFException e) {
                            System.err.println("File read.");
                    } catch (IOException e) {
                            System.err.println("File input error");
            public String getVal(String templateName){
                    String stemval=null;
                    try {
                            rafTemIn.seek(bloc); //bloc is a long value for beginng location to read from. It changes.
                            byte[] b = new byte[(int)(eloc - bloc + 1L)];
                            rafTemIn.read(b,0,(int) (eloc - bloc + 1L));
                            stemval = new String(b,"UTF-8");
                    } catch(IOException eio) {
                            System.err.println("Template Dump file IO error.");
                    return stemval;
            public static void main(String[] args){
                    Test t= new Test("template.idx");
                    System.out.println(t.getVal("wikipedia"));
    }

  • How to open different files depending on the case

    Hi
    I have 3 cases within a case structure.
    When I select a first case, I need a certain VI to start.(I have done this by just dragging the VI within that case)
    But when I select the 2nd case, I need to an executable file to pop up, but I am not able to drag it within the case structure beacuse when I select something other than a than a vi, it gives me the follwing error.
    LabVIEW: File is not a resource file
    The file Test.exe cannot be loaded.
    Also, I need to open a text file, if I choose the 3rd case. I am not able to this also, as I end up getting the same error.
    Can someone help me to solve this problem?
    Thanks in advance
    Solved!
    Go to Solution.

    To call an executable you will have to use "System Exec.vi"
    To open text file you can use same "System Exec.vi" and give path of text file to open to "Command Line" input of the vi.
    Read help file so as to understand the function of "System Exec.vi"
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.

  • How to determine the character encoding of a string

    I'm under the impression (however misguided this may be) that one of our Databases (it is set to 8859) is outputting it's values as 8859 charset to Java, who in turn is preserving this encoding.
    Printout on the contents of data.get(info) yields garbage.
    However, Doing
    value = new String((data.get(info).getBytes("ISO-8859-1")), "UTF-8");and printing 'value' yields the proper Asian characters.
    Is there a way to determine the Charset of a string somehow?

    Whereas some database drivers for other languages (C,
    C++) make it possible to set the encoding on the
    client side irrespectively to the database encoding
    setting. So you can skew your database with those
    programs.Some JDBC drivers allow one to specify the encoding as part of the connection URL. This may be a general property of JDBC drivers but, since I have now retired, my JDBC knowledge is getting as dated as I am so I don't really know.

  • How to set character encoding to Greek in a javascript file in Dreamweaver CS4?

    I have a javascript file built with a text editor some time
    ago, which has Greek characters in one of the variables:
    1.) --> var
    scrollercontent='</font><br><font face="Verdana"
    color="#333333" size="-1">11-04-2008:
    <b>ΜΑΝΩΛΗΣ
    ΜΗΤΣΙΑΣ
    </b><br><img SRC="mitsias2.gif" height=148 width=104
    border="0" /><p></font>' <--
    In DW CS4 it displays as
    2.) --> var
    scrollercontent='</font><br><font face="Verdana"
    color="#333333" size="-1">11-04-2008: <b>???O??S ???S??S
    </b><br><img SRC="mitsias2.gif" height=148 width=104
    border="0" /><p></font>' <--
    When trying to save the corrected content in 1.) I get an
    error message that DW cannot save the Greek characters. I am asked
    to change the character encoding.
    I don't know how to change the character encoding in a js
    file. Is there a "head" file like in HTML? Or how does one
    determine the character encoding in a js file?
    When I change the encoding in the prefereces, which is
    "Western" to "Greek" or "UTF", I have the same result.
    Thanks for help.
    jml

    The .js file and the html need to have the same encoding. If
    your html uses iso-8859-7, then the .js must also use that. But if
    the original text editor created the .js file using utf-8, then
    that is what the html needs to use.

  • c:import character encoding problem (utf-8)

    Aloha @ all,
    I am currently importing a file using the <c:import> functionallity (<c:import url="module/item.jsp" charEncoding="UTF-8">) but it seems that the returned data is not encoded with utf-8 and hence not displayed correctly. The overall file header is:
    HTTP/1.1 200 OK
    Server: Apache-Coyote/1.1
    Set-Cookie: JSESSIONID=E67F9DAF44C7F96C0725652BEA1713D8;
    Content-Type: text/html;charset=UTF-8
    Content-Length: 6861
    Date: Thu, 05 Jul 2007 04:18:39 GMT
    Connection: close
    I've set the file-encoding on all pages to :
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@ page pageEncoding="UTF-8"%>
    but the error remains... is this a known bug and is there a workaround?

    Partially, yes. It turns out that I created the documents in eclipse with a different character encoding. Hence the entire document was actually not UTF-encoded...
    So I changed each document encoding in Eclipse to UTF and got it working just fine...

  • Character encoding issue

    I'm using the below give code to send mail in Trukish language.
    MimeMessage msg = new MimeMessage(session);
    msg.setText(message, "utf-8", "html");
    msg.setFrom(new InternetAddress(from));
    Transport.send(msg);
    But my customer says that he gets sometime unreadable characters in mail. I'm not able to understand how to solve this character encoding issue.
    Should i ask him to change his mail client's character encoding settings?
    If yes which one he should set.

    Send the same characters using a different mailer (e.g., Thunderbird or Outlook).
    If they're received correctly, come the message from that mailer with the message
    from JavaMail. Most likely other mailers are using a Turkish-specific charset instead
    of UTF-8.

  • How to use the external encoder

    Can someone please tell me how to open the external encoder so i can copy and paste links into it to use my web cam?
    Thanks

    Find a forum for whatever product this involves and post your question there.
    Here is a link to a page that has links to all Adobe forums...
    Forum links page:
    https://forums.adobe.com/welcome

Maybe you are looking for