Can java write greek characters to an RTF (Rich Text Format) File???

Can java write greek characters to an RTF (Rich Text Format) File???

As far as I'm aware, java can put text in any font to an RTF file as long as that font is available on your machine.

Similar Messages

  • Default file associations and RTF (rich text format)

    I use pop3 email accounts for work.
    I receive daily emails with .rtf (rich text format) file attachments.
    When I open the emails, the attachments are listed.
    I touch to open and QuickOffice loads to open them.
    According to the QuickOffice website, QuickOffice does not support rtf files.. and it certainly does error on them. Why does QuickOffice open at all? I do not need any of its functions except the one it doesn’t have.
    I have installed at present, this list of file managers.
    Android’s default file manager
    OI File Manager
    Astro file manager
    Cool reader
    All of these applications support rtf files.
    How do I set the file association for rtf files to an application which supports them?
    Thanks for reading.

    I have the same problem any help would be appreciated

  • Forms calling a rich text format (.rtf) file

    Good day!
    Suppose I made up a report from oracle forms then used the options 'generate to file' > XML.
    Uses Microsoft Word 2010 with an add-ins 'Oracle BI Publisher' and make designs in my report then save it to .rtf (Rich Text Format).
    My question is how can I call my reports and display it using oracle forms?

    RTF files must be feeded by XML.
    Your answer is not just that simple. Besides, I've search for it already.
    Maybe my question to you is, is that possible?

  • Convert web page to adobe pdf can not convert greek characters

    Convert web page to adobe pdf can not convert greek characters. How to solve it?

    Convert web page to adobe pdf can not convert greek characters. How to solve it?

  • How can i write a string into a specified pos of a file?

    How can i write a string into a specified pos of a file without read all file into ram and write the whole file again?
    for example:
    the content of file is:
    name=123
    state=456
    i want to modify the value of name with 789
    (write to file without read all file into ram)
    How can i do it? thank you

    take this as an idea. it actually does what i decribed above. you sure need to make some modifications so it works for your special need. If you use it and add any valuable code to it or find any bugs, please let me know.
    import java.io.*;
    import java.util.*;
    * Copyright (c) 2002 Frank Fischer <[email protected]>
    * All rights reserved. See the LICENSE for usage conditions
    * ObjectProperties.java
    * version 1.0, 2002-09-12
    * author Frank Fischer <[email protected]>
    public class ObjectProperties
         // the seperator between the param-name and the value in the prooperties file
         private static final String separator = "=";
         // the vector where we put the arrays in
         private Vector PropertiesSet;
         // the array where we put the param/value pairs in
         private String propvaluepair[][];
         // the name of the object the properties file is for
         public String ObjectPropertiesFileName;
         // the path to the object'a properties file
         public String ObjectPropertiesDir;
         // reference to the properties file
         public File PropertiesFile;
         // sign for linebreak - depends on platforms
         public static final String newline = System.getProperty("line.separator");
         public ObjectProperties(String ObjectPropertiesFileName, String ObjectPropertiesDir, ObjectPropertiesManager ObjectPropertiesManager)
         //     System.out.println("Properties Objekt wird erzeugt: "+ObjectPropertiesFileName);
              this.ObjectPropertiesFileName = ObjectPropertiesFileName;
              this.ObjectPropertiesDir = ObjectPropertiesDir;
              // reference to the properties file
              PropertiesFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
              // vector to put the param/value pair-array in
              PropertiesSet = new Vector();
         //     System.out.println("Properties File Backup wird erzeugt: "+name);
              backup();
         //     System.out.println("Properties File wird eingelesen: "+PropertiesFile);
              try
                   //opening stream to file for read operations
                   FileInputStream FileInput = new FileInputStream(PropertiesFile);
                   DataInputStream DataInput = new DataInputStream(FileInput);
                   String line = "";
                   //reading line after line of the properties file
                   while ((line = DataInput.readLine()) != null)
                        //just making sure there are no whitespaces at the beginng or end of the line
                        line = cutSpaces(line);
                        if (line.length() > 0)
                             //$ indicates a param-name
                             if (line.startsWith("$"))
                                  // array to store a param/value pair in
                                  propvaluepair = new String[1][2];
                                  //get the param-name
                                  String parameter = line.substring(1, line.indexOf(separator)-1);
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  parameter = cutSpaces(parameter);
                                  //get the value
                                  String value = line.substring(line.indexOf(separator)+1, line.length());
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  value = cutSpaces(value);
                                  //put the param-name and the value into an array
                                  propvaluepair[0][0] = parameter;
                                  propvaluepair[0][1] = value;
                             //     System.out.println("["+ObjectPropertiesFileName+"] key/value gefunden:"+parameter+";"+value);
                                  //and finaly put the array into the vector
                                  PropertiesSet.addElement(propvaluepair);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while reading property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   // System.out.println("in ObjectProperties");
         // function to be called to get the value of a specific paramater 'param'
         // if the specific paramater is not found '-1' is returned to indicate that case
         public String getParam(String param)
              // the return value indicating that the param we are searching for is not found
              String v = "-1";
              // looking up the whole Vector
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = new String[1][2];
                   // trying to get out the array from the vector again
                   s = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we look up the value and write it in the return variable
                        v = s[0][1];
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // giving the value back to the calling procedure
              return v;
         // function to be called to set the value of a specific paramater 'param'
         public void setParam(String param, String value)
              // looking up the whole Vector for the specific param if existing or not
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we remove the param/value pair so we can add the new pair later in
                        PropertiesSet.removeElementAt(i);
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // if we land here, there is no such param in the Vector, either there was none form the beginng
              // or there was one but we took it out.
              // create a string array to place the param/value pair in
              String n[][] = new String[1][2];
              // add the param/value par
              n[0][0] = param;
              n[0][1] = value;
              // add the string array to the vector
              PropertiesSet.addElement(n);
         // function to save all data in the Vector to the properties file
         // must be done because properties might be changing while runtime
         // and changes are just hold in memory while runntime
         public void store()
              backup();
              String outtofile = "# file created/modified on "+createDate("-")+" "+createTime("-")+newline+newline;
              try
                   //opening stream to file for write operations
                   FileOutputStream PropertiesFileOuput = new FileOutputStream(PropertiesFile);
                   DataOutputStream PropertiesDataOutput = new DataOutputStream(PropertiesFileOuput);
                   // looping over all param/value pairs in the vector
                   for (int i=0; i<PropertiesSet.size(); i++)
                        //the String i want to read the values in
                        String s[][] = new String[1][2];
                        // trying to get out the array from the vector again
                        s = (String[][]) PropertiesSet.elementAt(i);
                        String param = "$"+s[0][0];
                        String value = s[0][1];
                        outtofile += param+" = "+value+newline;
                   outtofile += newline+"#end of file"+newline;
                   try
                        PropertiesDataOutput.writeBytes(outtofile);
                   catch (IOException e)
                        System.out.println("ERROR while writing to Properties File: "+e);
              catch (IOException e)
                   System.out.println("ERROR occured while writing to the property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
         // sometimes before overwritting old value it's a good idea to backup old values
         public void backup()
              try
                   // reference to the original properties file
                   File OriginalFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
                   File BackupFile = new File(ObjectPropertiesDir+"/backup/"+ObjectPropertiesFileName+".backup");
                   //opening stream to original file for read operations
                   FileInputStream OriginalFileInput = new FileInputStream(OriginalFile);
                   DataInputStream OriginalFileDataInput = new DataInputStream(OriginalFileInput);
                   //opening stream to backup file for write operations
                   FileOutputStream BackupFileOutput = new FileOutputStream(BackupFile);
                   DataOutputStream BackupFileDataOutput = new DataOutputStream(BackupFileOutput);
              //     String content = "";
                   String line = "";
                   // do till end of file
                   while ((line = OriginalFileDataInput.readLine()) != null)
                        BackupFileDataOutput.writeBytes(line+newline);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while back up for property file: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   System.out.println("this is a serious error - the server must be stopped");
         private String cutSpaces(String s)
              while (s.startsWith(" "))
                   s = s.substring(1, s.length());
              while (s.endsWith(" "))
                   s = s.substring(0, s.length()-1);
              return s;
         public String createDate(String seperator)
              Date datum = new Date();
              String currentdatum = new String();
              int year, month, date;
              year = datum.getYear()+1900;
              month = datum.getMonth()+1;
              date = datum.getDate();
              currentdatum = ""+year+seperator;
              if (month < 10)
                   currentdatum = currentdatum+"0"+month+seperator;
              else
                   currentdatum = currentdatum+month+seperator;
              if (date < 10)
                   currentdatum = currentdatum+"0"+date;
              else
                   currentdatum = currentdatum+date;
              return currentdatum;
         public String createTime(String seperator)
              Date time = new Date();
              String currenttime = new String();
              int hours, minutes, seconds;
              hours = time.getHours();
              minutes = time.getMinutes();
              seconds = time.getSeconds();
              if (hours < 10)
                   currenttime = currenttime+"0"+hours+seperator;
              else
                   currenttime = currenttime+hours+seperator;
              if (minutes < 10)
                   currenttime = currenttime+"0"+minutes+seperator;
              else
                   currenttime = currenttime+minutes+seperator;
              if (seconds < 10)
                   currenttime = currenttime+"0"+seconds;
              else
                   currenttime = currenttime+seconds;
              return currenttime;

  • [svn] 3148: You can now use CSS styles to set the default text format for TextView.

    Revision: 3148
    Author: [email protected]
    Date: 2008-09-08 15:01:15 -0700 (Mon, 08 Sep 2008)
    Log Message:
    You can now use CSS styles to set the default text format for TextView. It no longer has any formatting properties. It supports the entire set of Gumbo text format styles.
    SkinnableComponent and Group now also support all these styles. However, skins such as ButtonSkin, TextInputSkin, and TextAreaSkin continue for now to specify instance styles on their TextBox, TextGraphic, and TextView, in order to give them a Gumbo look rather than a Halo look. So if you try setting, for example, the fontSize on the Application, it doesn't yet affect the text format of a Button, TextInput, TextArea, etc. unless you remove the instance style in the skin.
    Reviewer: Glenn
    Bugs: -
    QA: Lots of new stuff to test!
    Doc: No
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextArea.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/SkinnableComponent.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicEle ment.as

    Nevermind guys - I did it using the 'rb_on.selected' command on the "on" radio button if the .txt file variable was "on", else the "off" radio button is selected.
    Thanks for taking a look though!
    Shaun

  • Java write/append to each line of a text file

    I have spent numerous hours trying to figure out what I am doing wrong. If anyone more experienced could tell me what is wrong with my code.
    I have a very simple text file with 5 lines:
    line1
    line2
    line3
    line4
    line5
    All I am trying to do is append some string to the end of each of those lines. Everytime I run my code, it erases all content but does not write/append anything to the file. Any help is greatly appreciated.
    Thanks! I am about to throw this monitor out the window!!
    package Chapter6;
    import java.io.*;
    public class fileNavigation2 {
         public static void main(String[] args) {
              File dir = new File("C:\\testing");
              System.out.println(dir.isDirectory());
              try {
                   File file = new File(dir, "Test.txt");
                   FileReader fr = new FileReader(file);
                   BufferedReader br = new BufferedReader(fr);
                   FileWriter fw = new FileWriter(file);
                   BufferedWriter bw = new BufferedWriter(fw);
                   String s = "Add1,";
                   String s2 = "Add2\n";
                   String str;
                   while((str = br.readLine()) != null) {
                   StringBuffer sb = new StringBuffer(str);
                   sb.append(s + s2);
                   String y = sb.toString();
                   System.out.println(sb);
                   System.out.println("Appending");
                   bw.write(y);
                   bw.close();
                   System.out.println("Done");
              }catch(IOException e) {}
    }

    First, thanks a lot for your feedback. The code makes a lot of sense but it does not update the content of my Test.txt file.
    I only edited the line of code that creates the new file so that it could find the location of the file.
    Scanner file = new Scanner(new File("C:\\testing",fileName));==============================
    The code now looks like:
    import java.io.*;
    import java.util.*;
    public class Main {
        static void appendTo(String fileName, String[] newLines) throws IOException {
            List<String> allLines = getLinesFrom(fileName);
            for(String line : newLines) {
                allLines.add(line);
            writeLinesTo(fileName, allLines);
        static List<String> getLinesFrom(String fileName) throws IOException {
            List<String> lines = new ArrayList<String>();
            Scanner file = new Scanner(new File("C:\\testing",fileName));
            while(file.hasNextLine()) {
                lines.add(file.nextLine());
            file.close();
            System.out.println(lines);
            return lines;
        static void writeLinesTo(String fileName, List<String> lines) throws IOException {
            BufferedWriter out = new BufferedWriter(new FileWriter(fileName));
            for(String line : lines) {
                out.write(line);
                out.write(System.getProperty("line.separator"));
            out.close();
        public static void main(String[] args) {
            String fileName = "Test.txt";
            String[] extraLines = {
                    "a new line",
                    "and yet another new line"
            try {
                appendTo(fileName, extraLines);
                System.out.println("Done.");
            } catch (IOException e) {
                e.printStackTrace();
    }Again, thanks for the help.

  • How can I write a checkbox.label into a server text file?

    Hello, world...
    I have a problem...
    I need to write into a server text file the label of the selected checkbox..
    The client side script is:
    private function writeFile (e:MouseEvent):void
                 if (cb1.selected == true && writeBtn.label == "Conferma")
                     nc.call ("WriteNow",null,"La lettera iniziale è:"+cb1.label+"\n");
                     writeBtn.label = "Fatto";
                 else if (cb2.selected == true && writeBtn.label == "Conferma")
                      nc.call ("WriteNow",null,"La lettera iniziale è:"+cb2.label+"\n");
                     writeBtn.label = "Fatto";
                 else if (cb3.selected == true && writeBtn.label == "Conferma")
                       nc.call ("WriteNow",null,"La lettera iniziale è:"+cb3.label+"\n");
                      writeBtn.label = "Fatto";
    ...and the server side script is:
    var anVis = new File("Analisi_Visiva.txt");
    fileWriter.WriteNow = function(cliMsg)
            anVis.open("text", "append");
            if (anVis.isOpen)
                 anVis.write(cliMsg);    //line 17.
                 anVis.close( );
    I have this error in the Live Log of the FMS3 Administration Console:
    Sending error message: C:\Programmi\Adobe\Flash Media Server 3\applications\AnalisiVisiva\AnalisiVisiva.asc:line 17:File operation write failed.
    Why doesn't It work?
    Please, help me...
    Emiliano.

    Hello,
    In order to download your internal table just call the following fm:
      CALL FUNCTION 'TB_LIMIT_WS_DOWNLOAD'
       EXPORTING
      BIN_FILESIZE                  = ' '
         filename                      = dest
         filetype                      = 'ASC'
         mode                          = 'O'
       IMPORTING
         filelength                    = filesi "Bytes read
        TABLES
          data_tab                      = p_ti_temp "your IT
       EXCEPTIONS
         file_write_error              = 1
         invalid_filesize              = 2
         invalid_type                  = 3
         no_batch                      = 4
         unknown_error                 = 5
         gui_refuse_filetransfer       = 6
         no_authority                  = 7
         OTHERS                        = 8
    Hope this helps
    Gabriel

  • How do I write complex numbers to an excel or text spreadsheet file.

    I am performing an FFT on 3 channels of simultaneous analog input. I want to write the resultant 3 complex numbered arrays to a spreadsheet. Do I have to seperate the a and b*i components into r and theta and write two columns per array or is there a better way?

    Perhaps you can write it as a String..?
    Khalid

  • SMTP error (cannot send) when sending rich text format (RTF) messages

    I HAVE POSTED THIS TOPIC IN THE TIGER > MAIL & ADDRESS BOOK DISCUSSION AREA
    because most of my users are using OS X 10.4.11 & OS X 10.4.10 with Mail 2.1.1 & Mail 2.1
    but this ALSO AFFECTS the two LEOPARD users I have using OS X 10.5.1 with Mail 3.1.
    This is just a notification. Please carry on the discussion "back" there.
    Thanks. Jeff.

    Please see my last post in Mac OS X v10.4 Tiger > Mail and Address Book under same topic heading for solution.

  • Can I write in greek on pages?

    Can I write Greek on pages? Many people say to use symbols but I don't know how to.

    LiqDarkness wrote:
    A much easer option if you just want to put a singular Greek symbol is to use the Edit > Special Characters option which is essentially "symbols"
    There is no Edit > Special Characters option in Pages for iOS, that is only possible in Pages for OS X, which is handled in a different forum.

  • I can't see the Greek characters using ADOBE reader

    Dear colleagues,
    Your help will be appreciated for the following problem:
    I have a tool which converts IBM I (AS400) spool file to PDF.
    The file has been copied to Windows environment.
    On generated PDF I can’t see the Greek characters using ADOBE reader v10.1.4.
    If I use Notepad to display the file, I can see the Greek characters.
    It seems that following PDF keywords are not recognized form PDF reader.
    /BaseFont /Courier
    /Encoding /WinAnsiEncoding  
    I have tried to use various fonts and encoding (cp1253, ISO8859-7) with no luck.
    On PDF reader folder there is the following file:C:\Program Files\Adobe\Reader 10.0\Resource\TypeSupport\Unicode\Mappings\win\CP1253.TXT
    I believe somehow to tell PDF reader to use this encoding.
    What actions required on our Win/PDF environment setup?
    What actions required on PDF file generation? (/BaseFont, /Enconding, etc)

    Too many assumptions! It is much, much more complicated than your attempted solutions. The PDF Reference shows the contents of WinAnsiEncoding; this is as for your first example. I feel you probably need to spend very much more time reading this book.
    In the second example you are using a different code page (or other encoding method) to view the data. This is not going to help you because WinAnsiEncoding is fixed in all environments and does not use the code page.
    To use greek characters you will need the PDF to
    - use fonts which contain greek characters (the built in Courier PostScript font probably does not)
    - use an Encoding which references the greek characters. There are no built-in encodings that do this
    You cannot make simple cosmetic changes to this file to do this. The style of simplified font with no FontDescriptor can be used only for the built-in 14 fonts, which cannot be used with a greek encoding.
    Commonly, a combination of the greek letters in the Symbol font and the Latin letters in another font are used by constant font switching. This is of course only a solution for Greek, not other non-Latin alphabets.

  • Cannot view greek characters on My Web Search

    I can't view greek characters after search on ''My Web Search''.
    View tab is in Unicode(UTF-8)position.

    I can't view greek characters after search on ''My Web Search''.
    View tab is in Unicode(UTF-8)position.

  • OCFS2 restart my Linux when he can´t write on storage

    Is correct the OCFS2 restart my LINUX(Centos 5) when he can´t write on my storage ??
    My STORAGE = OPEN FILER with ISCSI !
    THANKS

    I am wrong about the hangcheck timer.
    The relevant FAQ to answer your question is at http://oss.oracle.com/projects/ocfs2/dist/documentation/ocfs2_faq.html#HEARTBEAT might help answer your question better
    Specifically look at the addendum to the answer to Q.77

  • RTF and Greek characters

    Hello
    I am trying to build a swing application witch displays
    RTF
    documents in Greeks from a database. I have try to use
    jTextPane but the Greeks characters does not displays
    correct.
    I have try to paste a document from a word with the same
    results.
    What is the problem?

    The problem is not the font
    My problem is that:
    I am having a huge access database file with an rtf field. That rtf has created from Word. When am trying to display those field in a JTextPane greek characters does not displayed correct.
    If i wrote some text with Greek characters in JTextPane then those characters appears correct.
    When i saw row data from rtf field in access greek characters is as \'e1\'e2\'e3 etc. When I saw row data from an RTF file thaw created from JTextPane greek characters appears like this \u945 ?\u946 ?\u947 ?\u948 ?\u949 ?\u950 ?\u951 ?\u952 etc.
    I think the problem is that data in RTF field in access is in Cp1253 - Windows Greek and JTextPane needs UTF-8 or UTF-16 RTF
    Is is Possible to convert the data from RTF field from Database File to UTF-8 or UTF-16 RTF to work correct with Java?
    or best to convert to HTML as UTF ?

Maybe you are looking for

  • How to create SDA file for using AXIS Framework in the SOAP Adapter

    Hi experts, I have the following question: How I can create the SDA file aii_af_axisprovider.sda for using the AXIS Framework in the SOAP Adpater described in http://help.sap.com/saphelp_nw04/helpdata/en/45/a4f8bbdfdc0d36e10000000a114a6b/content.htm

  • I cal synch

    I imagine this has been beat to death.. but I cannot figure it out! ( I am computer illiterate I guess!) I cannot get my ical to snch with my laptop. I CAN get my laptop i cal to synch to my phone, but if I enter something in my phone it stays there.

  • Why did AIM for Ichat suddenly return an error?

    I was using AIM for iChat earlier this morning and everything was working fine. Then suddenly, without warning, it logs out of every iChat account and returns the error: "An internal error occured that disconnected you from all iChat services. To res

  • ASA 5525X with 9.1(2) IOS version Memory grow issue

    Hi, So, finnaly i have installed two 5525X firewals in A/S failover. working fine, CPU is ok. memory behave very strange. it is growing day by day. i have a week already firewalls installed and the memory grew from 20 % to 51 % CPU is arrounf 20- 30

  • How can i save my logo?

    Hello i have created a logo for my website but i want to save the logo as a picture not as an Illustrator so i can open the logo like a picture not like an illustrator product please help me thanks