Special characters from textfield to properties file and back

Hi,
The character "o with two dots above it" is being read from a file into a String then written to a proerties file.
It is stored in the proerties file as \uFFFD
When I read this character from the proerties file, and place it in a JTextField, it is displayed as a box character.
Is the character \uFFFD a box ?, or is the corruption happening in the JTextField ?
So my question is,
Is the Properties object useless or is the JTextfield useless ?
Cheers

\uFFFD is a replacement character; it is the substitute for characters that could not be converted to Unicode. This means that the problem is most likely in the code where you read the original file, in effect, that the character encoding you are using to read is different from the encoding of the text file.
Can you post the code where you read the file? It should look something like this if the original file is encoded in UTF-8:
http://javaalmanac.com/egs/java.io/ReadFromUTF8.html

Similar Messages

  • I have a MacBook purchased in 2009 with Snow Leopard. I tried to access "special characters" from the Finder menu and an intermittent blank pop ups and will not stop. It also happens when I run Word or Pages.

    The blank pop up began as I tried to access "special characters" from the finder menu. I restarted, turned off and restarted and it did not work. It interferes with any application because I cannot work fast. Every new step takes a few seconds longer such as saving, finding text, check spelling and many more. I am desperate to solve this. Thanks in advance for any help given.
    Consuelo Corretjer

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • Static lookup lists:read data from a Java *.properties file

    Hi
    i need to make static lookup lists i am using read data from a Java *.properties file
    i am using the Class "PropertyFileBasedLookupViewObjectImpl" that wrote by Steve Muench in ToyStore.
    but i need to use the default language for that i update the loadDataFromPropertiesFile()
    method to find the correct properties file
    String temp=Locale.getDefault().getLanguage();
    String propertyFile =
    getViewDef().getFullName().replace('.', '/')+"_"+temp+ ".properties";
    the problem:
    For English(TEST_en.properties) it is good and working
    For Arabic(TEST_ar.properties) read from correct file _ar.properties
    but the dispaly character is wrong
    When Debug
    In the File 1=دمشق
    In debug 1=/u32423

    Depending on your use case you can either use a programmatic VO or directly expose the JV class as a data control.
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

  • Need to Put Some data in Properties File and Access it

    HI Friends,
    I want to store the data (servername,User id ) in Archana.properties file from WebDYnpro Application
    Pls let e know where to place the properties file and also let me know how to access the properties file from WD application and Modify it.
    I have tried placing in: src/mimes, Configuration etc...but i am unale to access it.
    Also If i access the properties file and update it, do i again need to deploy the WD application.
    Kindly let me know if there are any better methods to store key value pairs from the application.
    Regards,
    Archana

    HI,
    The better approch will be to store the .properties file into a known folder manually created in the server  where the Application is deployed?
    That means where?
    Itried placing my .prpoerties file at several places in my Project(Not server)- Mimes, Configuration, Packages.
    I tried the same kind of  code u specifed.
    But the file.exists returns false, though there is a file in the location.
    When i am trying with javaproject, it works but in webdynpro project, its says file not found
    Below is the code:
    package com.sap.demo.casestudy.wd;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Properties;
    public class ReadWriteArc {
    @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              WriteProperty("Key3", "Value3");
              String value=ReaddProperty("key2");
         public static void WriteProperty(String key,String value) {
              try {
                        Properties pro = new Properties();
                        File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/configuration/Archana.Properties");
                        //File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/mimes/Components/com.sap.demo.casestudy.wd.comp.webdynproappln.WebDynproAppln/Archana.Properties");
                        //File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/packages/com/sap/demo/casestudy/wd/Archana.Properties");
                        if (!f.exists()) {
                             System.out.println("File not found!");
                        } else {
                             FileInputStream in = new FileInputStream(f);
                             pro.load(in);
                             pro.setProperty(key, value);
                             pro.store(new FileOutputStream("Properties"), null);
                             System.out.println("Operation completly successfuly!");
               catch (IOException e) {
                   System.out.println(e.getMessage());
         public static String ReaddProperty(String key) {
              try {
                   String valuemessage=null;
                        Properties pro = new Properties();
                        File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/configuration/Archana.Properties");
                        //File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/mimes/Components/com.sap.demo.casestudy.wd.comp.webdynproappln.WebDynproAppln/Archana.Properties");
                        //File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/packages/com/sap/demo/casestudy/wd/Archana.Properties");
                        if (!f.exists()) {
                             System.out.println("File not found!");
                        } else {
                             FileInputStream in = new FileInputStream(f);
                             pro.load(in);
                              valuemessage = pro.getProperty(key);
                             System.out.println("Read completly successfuly! and the value is "+valuemessage);
                        return valuemessage;
               catch (IOException e) {
                   System.out.println(e.getMessage());
               return null;
    And from WD Application i called the class as:
    ReadWriteArc.WriteProperty(engname, reserveEngine1);
    Pls suggest if am making any mistake here
    U say Server, how can i do that?
    Regards,
    Archana:)

  • Remove special characters from incoming data

    Hi Varun, You could use either of below.. REG_REPLACE(YOUR_INPUT_STR,^[A-Za-z0-9 ],NULL)  -- Replaces all non-alphanumeric with null
       REG_EXTRACT(YOUR_INPUT_STR,[A-Za-z0-9 ]) -- Extracts only alphanumeric data -Rajani

    i have special character coming in the source data and i want to remove it before loading into target, currently i am getting one special character , it may come as some other type of special character  other than alpha numeric. so how to remove those special characters from data and load the alphanumeric data into target.

  • WLST define array in properties file and access in WLST

    Hi Guys,
    Just had a question, I am developing WLST script to configure WebLogic manage server instances and want to do in much way that user need to update properties file and then WLST/python reads it and logic in the script will configure # of manage server instances specified in properties file..
    properties.txt:
    mserver = ['MS1','MS2','Ms3'] ## define array in properties file
    WLST.py ( i am having trouble reading array from properties.txt)
    from jarray import array
    load('properties.txt') # load the properties file in script
    Is there standard way I can read array from the file the way we do normal variable.. or any new suggestions will highly be welcomed?
    Regards..

    You don't have to define you parameter as an array (a=['one'],['two'], etc) at the properties file. I think that this is a good way to do what you want:
    file.prop file >
    var=one two threewlst file >
    loadProperties('file.prop')
    sepVar=String(var).split(" ")
    for i in sepVar:
      print "- Separated var: " + iIt should print something like
    - Separated var: one
    - Separated var: two
    - Separated var: threeEdited by: 904641 on Mar 29, 2012 2:38 PM

  • Remove / unload external swf file(s) from the main flash file and load a new swf file and garbage collection from memory.

    I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
    This is the error message(s) I am receiving: "TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at index_fla::MainTimeline/Down3()"
    import nl.demonsters.debugger.MonsterDebugger;
    var d:MonsterDebugger=new MonsterDebugger(this);
    stage.scaleMode=StageScaleMode.NO_SCALE;
    stage.align=StageAlign.TOP_LEFT;
    stage.addEventListener(Event.RESIZE, resizeHandler);
    // loader is the loader for portfolio page swf
    var loader:Loader;
    var loader2:Loader;
    var loader3:Loader;
    var loader1:Loader;
    //  resize content
    function resizeHandler(event:Event):void {
        // resizes portfolio page to center
    loader.x = (stage.stageWidth - loader.width) * .5;
    loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    /*loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;*/
    addEventListener(Event.ENTER_FRAME, onEnterFrame,false, 0, true);
    function onEnterFrame(ev:Event):void {
    var requesterb:URLRequest=new URLRequest("carouselLoader.swf");
    loader = null;
    loader = new Loader();
    loader.name ="carousel1"
    //adds gallery.swf to stage at begining of movie
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requesterb);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    // stop gallery.swf from duplication over and over again on enter frame
    removeEventListener(Event.ENTER_FRAME, onEnterFrame);
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent):void {
    // re adds listener for contact.swf and about.swf
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
    var requester:URLRequest=new URLRequest("carouselLoader.swf");
        loader = null;
    loader = new Loader();
    loader.name ="carousel"
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    removeChild( getChildByName("about") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of gallery.swf
    MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    function Down1(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    var requester:URLRequest=new URLRequest("contactLoader.swf");
    loader2 = null;
    loader2 = new Loader();
    loader2.name ="contact"
    loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader2.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader2);
    loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    function Down3(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    var requester:URLRequest=new URLRequest("aboutLoader.swf");
    loader3 = null;
    loader3 = new Loader();
    loader3.name ="about"
    loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader3.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader3);
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    removeChild( getChildByName("carousel") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
    stop();

    Andrei1,
    Thank you for the helpful advice. I made the changes as you suggested but I am receiving a #1009 error message even though my site is working the way I wan it to work. I would still like to fix the errors so that my site runs and error free. This is the error I am receiving:
    "TypeError: Error #1009: Cannot access a property or method of a null object reference."
    I'm sure this is not the best method to unload loaders and I am guessing this is why I am receiving the following error message.
         loader.unload();
         loader2.unload();
         loader3.unload();
    I also tried creating a function to unload the loader but received the same error message and my portfolio swf was not showing at all.
         function killLoad():void{
         try { loader.close(); loader2.close; loader3.close;} catch (e:*) {}
         loader.unload(); loader2.unload(); loader3.unload();
    I have a question regarding suggestion you made to set Mouse Event to "null". What does this do setting the MouseEvent do exactly?  Also, since I've set the MouseEvent to null do I also have to set the loader to null? e.g.
    ---- Here is my updated code ----
    // variable for external loaders
    var loader:Loader;
    var loader1:Loader;
    var loader2:Loader;
    var loader3:Loader;
    // makes borders resize with browser size
    function resizeHandler(event:Event):void {
    // resizes portfolio page to center
         loader.x = (stage.stageWidth - loader.width) * .5;
         loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
    //adds gallery.swf to stage at begining of moviie
         Down();
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent = null):void {
    // re adds listener for contact.swf and about.swf
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
         var requester:URLRequest=new URLRequest("carouselLoader.swf");
         loader = new Loader();
         loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader.load(requester);
         } catch (error:SecurityError) {
         trace(error);
         this.addChild(loader);
         loader.x = (stage.stageWidth - 739) * .5;
         loader.y = (stage.stageHeight - 500) * .5;
    // sure this is not the best way to do this - but it is unload external swfs
         loader.unload();
         loader2.unload();
         loader3.unload();
    // remove eventlistner and prevents duplication of gallery.swf
         MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         function Down1(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         var requester:URLRequest=new URLRequest("contactLoader.swf");
         loader2 = null;
         loader2 = new Loader();
         loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);    
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader2.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader2);
         loader2.x = (stage.stageWidth - 658.65) * .5;
         loader2.y = (stage.stageHeight - 551.45) * .5;
    loader.unload();
    loader2.unload();
    loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         function Down3(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         var requester:URLRequest=new URLRequest("aboutLoader.swf");
         loader3 = null;
         loader3 = new Loader();
         loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader3.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader3);
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
         loader.unload();
         loader2.unload();
         loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
         stop();

  • How can I remove special characters from spreadsheet filename?

    Hi
    Having a spreadsheet filename coded (on the Report Attributes page) as &VARIABLE..csv works fine unless the VARIABLE contains special characters such as space, lt, gt and so on.
    In the case of space, it is replaced by %20 in the generated filename. Is it possible convert the %20s to underscores (or remove them)?
    thanks
    Trevor

    Trevor,
    I would use a computation on that page to alter the value of variable, perhaps a SQL Expression such as:
      replace (:VARIABLE, ' ', '_')Alternatively, look at the process that puts the value into VARIABLE in the first place and ensure no spaces >, etc are assigned.
    Sergio

  • Blue screen of death, and continous reboot.  Phone never actually boots up, just keeps going from reboot to blue screen and back again.  Any suggestion?

    Blue screen of death, and continous reboot.  Phone never actually boots up, just keeps going from reboot to blue screen and back again.  Any suggestion?

    Hello jared1915
    If you are stuck in that loop, the next step would be to restore your iPhone. Check out the article below to get your iPhone into recovery-mode and restore it in iTunes.
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808
    Regards,
    -Norm G.

  • My iPhone is split from front panel on top, and back cover of my is swollen too. I am not able to use my phone and I cannot access my data in the phone. Please suggest what could be the cause of this problem?

    My iPhone is split from front panel on top, and back cover of my is swollen too. I am not able to use my phone and I cannot access my data in the phone. Please suggest what could be the cause of this problem?

    It sounds like the battery might have gone bad, and is swelling and causing the symptoms you describe.  Do not attempt to use the phone, but take it to Apple for evaluation.

  • When mousing over text, the cursor flickers constantly (with each letter passed) from arrow to i-beam and back.  The problem occurs in both MS Word and Pages.  Any idea of how to resolve this annoying problem is appreciated.  System: 10.10.1

    When mousing over text, the cursor flickers constantly (with every letter passed) from arrow to i-beam and back.  The problem occurs in both MS Word 2011 and Pages.  Any idea of how to solve this annoying problem will be much appreciated.  System 10.10.1 on a MacPro (Late 2013)

    The mouse is controlled by the OS so don't guess any app other than a mouse driver or OS X itself would be able to cause this sort of flicker issue.
    Have you seen the following and is it what you are seeing? Maybe you could make a movie (Quicktime is great for this this to make a screen recording) - but not sure how to attach a movie to these discussions as mine is grayed out and can't be selected (to the right of the insert image). Here is the what I found for a search of "mouse cursor flickers os x yosemite"
         https://www.youtube.com/watch?v=ZNQ0D84DdF4
    What kind of mouse are you using? Is the mouse driver up to date if it's a third party mouse?

  • How can i delete the contains of my iCloud forever? I deleted erase the files in my iPhone but they come back when i start New backup, even when i erase the files and back ups and logoff.

    How can i delete the contains of my iCloud forever?
    I deleted the files in my iPhone but they come back when i start New backup, even when i erase the files and back-ups.
    When i start a new download, the pictures come back, but they aren't in my iphone.

    wow you too never got NO answer, what nerve its worse then mobileme

  • I changed from one iPhone to another and backed the first one up to the icloud. I have restored the content to my new iphone but cannot download the photos. Any advise will be greatly appreciated

    I changed from one iPhone to another and backed the first one up to the icloud. I have restored the content to my new iphone but cannot download the photos. Any advise will be greatly appreciated

    Welcome to the Apple Community.
    Photos and some other items are added back after the restore has completed, you may need to wait a while.

  • Reading special characters from a flat file and inserting into DB

    I'm reading data with special characters like . etc from a flat file , assigning the data to variable in my anonymous block and inserting into my DB. But the show up as inverted ? s. Any clues about how to do this?
    If i try to do the insert directly it works. It seems like the error occurs when reading this data into a variable
    thanks for the help
    Lalit Bhatia

    lalit, this is probably an character set problem, the default on Database creation tends to be 7bit Ascii which does not support special characters, it's been a while since I set up a db in this way, but you need to change settings in oracle.ini. The db will need to be restarted for this. Also, to check current settings try:
    select * from NLS_DATABASE_PARAMETERS
    You want an 8bit, unicode or multibyte character set. Sorry I cannot remember moer off the top of my head, try searching on NLS or character set

  • XSL-FO unable to read special characters from the XML file

    Team,
    please help on issue, when trying to read the text from XML file (Special characters like bullet). It is displaying as Question mark(?) in output in place of bullet..please proved any soultion.

    The "?" signals a character set mismatch issue - http://www.oracle.com/technetwork/database/globalization/nls-lang-099431.html - between client and database software

Maybe you are looking for