PrintWriter change 0x80 to question mark ??

hi,
I'm encountering a weird behaviour from this code fragment:
<snip>
PrintWriter pw = new PrintWriter(new BufferedWriter(new
FileWriter(filename)));
for (int i=0x80; i <= 0xA0; i++) {
pw.print((char) j);
<snip>
the file will only have a series of '?' written there. using hex editor I see the value is 0x3F.
Can anyone please explain why this is happening? Why I write 0x80, but I get 0x3F?? How to fix this?
Thanks & Regards,
Antony Hoon

O.K the point was trying to write characters which r not printable....so
u cant use the character writers or readers....they tend to change the data mentioned in my previous post.
So use any byte output stream like FileOutputStream and write to the files. And also read using byte streams...
Instead of this
<code>
FileWriter fo = new FileWriter("c:\\print");
          char[] b = new char[256];
          for(int i=0; i<256; i++)
          b[i] = (char) i;
          fo.write(b);
          fo.close();
<code>
use this
<code>
FileOutputStream fo = new FileOutputStream("c:\\print");
          byte[] b = new byte[256];
          for(int i=0; i<256; i++)
          b[i] = (byte) i;
          fo.write(b);
          fo.close();
<code>
U can see the difference of outputs.
Besto
guru

Similar Messages

  • Flash changes apostrophe to question mark when saving data?

    Hi,
    Ok these are the steps I take to create the problem within my Flash application.
    1. Copy and paste a string from a word.doc which contains an apostrophe
    2. I then save this data to a XML doc.
    3. reload that XML data, now the apostrophe has changed to a square box
    4. I then resave this data
    5. I reload this data and now, the square box has changed to a question mark.
    My question is, how do I stop this from happening other than not copying from a word doc?
    Is there something extra I have to do when parsing the string into its saved format.
    Currently what happens is:
    1. Pass the string from the input box to an object
    localTextObject.textData = myInput.text
    2. The object is then parsed through a custom Object to XML parser
    for example:
    textNode.text = "";
    textNode.text.appendChild( localTextObject.textData );
    3. And then an XML file is saved local with this data in it.
    Does Flash do something wonderful along the way as so by the third time around we have gone from a speech mark to a question mark?
    Any help with solving this problem would be very much appreciated.
    Thanks

    Apostrophes from word aren't part of the normal ASCII character set. They've been mucking up plain text forever...
    You can use a RegEx to strip them out, or just change them to regular apostrophes. Something like so should work:
    reg = new RegExp("“", "gi");
    m = m.replace(reg, "");

  • When my desktop (Mac Power 5) starts a folder comes up with 2 heads which changes to a question mark. Does anyone know how to fix this.?

    My Husband turned his desktop off without shutting down now When my desktop (Mac Power G5) starts up  a folder comes up with 2 heads which changes to a question mark. Does anyone know how to fix this.?

    Step 1- Try booting to Startup Manager by holding Option/Alt key.
    Select the boot source and click the right arrow.
    Once booted, open System Preferences and select the desired boot volume.
    Replacing the PRAM battery is likely wise if the machine keeps forgetting it's boot source.
    If that doesn't work,
    Step 2-  Boot holding a mouse click, insert the OS X install disc and hold C to boot to the install disc.
    Once booted, open Disk Utility and "Repair Disk" on the boot drive.
    Once done, reboot normally.
    More:
    http://support.apple.com/kb/TS1440

  • How can I change the Arabic question mark (shift +...

    I have a Nokia E72 that was purchased from Dubai. All default languages are changed now to English. Even the "Writing Language" is in English. But when I type a text message, the keyboard key for the question mark (shift + L) comes up in Arabic. Is there a way to change this (either a quick fix or one going through the OS) to permanently appear in English?

    Security questions:
    https://discussions.apple.com/docs/DOC-4551
    http://support.apple.com/kb/HT5312

  • IPhoto icon changed to a question mark in my launch pad...

    Hi All,
    I used to have an iPhoto icon in my launch pad in order to pull up my pictures/movies.  Where I used to have the "regular" iPhoto icon, I now have a question mark and when I click on it, nothing happens.  I tried to use finder to find my iPhoto library, but nothing came up.  Any advice?  Thanks, LN

    It is incredible that your iPhoto application should have vanished completely. Try one more search with the Finder and ensore that it really searches everywhere:
    Select "Computer" in the Finder's sidebar, or the system drive, if you only have one drive.
    Enter iPhoto in the search field and press "+" to add a rule "kind is Application",
    Can you post a screenshot please, of what you see in yur "Pictures" folder? Also select one of the thumbnails of your photos and use the command "File > Get info". What information can you see about your files?

  • Cursor becomes a question mark and prevents input

    I first entered this in the Mini forum, then realized it had to be a software issue.
    My cursor arrow changes to a question mark. Odd things are happening. In Firefox and PhotoShop, numerous "Help" windows open. If I try to shut them, I just get more. I have to Force Quit. In Mail, I can't type more than a couple of characters on the keyboard. This is true in some other apps as well.
    What on earth is going on? Safari does not call up help windows on its own—just for PS, but I can only occasionally click on anything or enter a character. I can cut and paste info into boxes...a ridiculous way to work!
    I have to use my laptop to ask for some real help with my Mini, as I can't type anything in "Help" either!
    I don't know that the problem began with Mail, but I was sending an e-mail response when it lost half the message and did not complete the send process. That has never happened before, but I don't know if that was cause or symptom. Did I accidentally strike some weird combination of keys?
    I can type in AppleWorks 6 and Word. This must mean that it isn't a faulty keyboard. The keyboard and mouse I'm using are my old wired ones from my g4 dual 500. I've never had a problem with either.

    OK, I booted up in Safe Mode. I ran Disk Utility and repaired permissions. I was able to type in Mail, use Safari and make a stickie not with the info on the permissions. Unfortunately, the "?" began appearing after a fairly short while. It first cropped up in Safari. I had closed the other apps. Stickies can't be used. Mail is non-responsive to keyboard. It sometimes responds if I click the mouse in the finder, then back in mail...for 1 action.
    OK, having "looked at" all the suggested places and compared them to the same places on my powerbook, they don't seem to be set up quite the same, e.g., the mbp has considerably more items in the System Library Startup Items folder. Since I don't know what I'm looking for, this seemed a fruitless exercise. Nothing jumped out at me. Even if I did know what all the acronyms stand for, I wouldn't have the foggiest notion if they were as they were supposed to be.
    I tried using Find to locate any invisible files created this week that were less than 800 KB in size, as I'd read somewhere that there was a virus that fit that description. I let it run all night. If it was working, nothing turned up.
    Any other ideas?
    bummer...sure would be nice if I knew what to look for...feels like snark-hunting, you know...

  • Cursor becomes a question mark

    I cannot find any similar questions.
    My cursor arrow changes to a question mark. Odd things happen then. In Firefox, numerous "Help" windows open. If I try to shut them, I just get more. I have to Force Quie. In Mail, I can't type more than a couple of characters on the keyboard. This is true in some other apps as well. In Word, I can type. This must mean that it isn't a faulty keyboard.
    What on earth is going on?
    I'm using my laptop to ask for some real help with my Mini, as I can't type anything in "Help" either!

    Has this problem been going on for several reboots or days, or is it a first-time occurrence?
    What kind of mouse and keyboard do you have? Are they wired or wireless?
    I see from your first forum post that you had problems with AppleWorks crashing, possibly due to your keyboard layout selection. Did you resolve that issue? If so, how?

  • Mac Mail with question mark

    Help - just tried to open Macmail on my old IMac. Suddenly a question mark appears covering the MacMail icon in the dock. It won't open at all. Any thoughts? Many thanks

    Hello DM Edmonds,
    From Mac Help:
    The Dock contains a question mark icon
    If you delete an application or document that has an icon in the Dock, the Dock >icon changes to a question mark.
    To remove the question mark icon:
    Drag it from the Dock.
    To add a new item to the Dock, locate the item and drag its icon to the Dock.
    It is my understanding that if the Dock icon of a particular application changes to a question mark it means that the application has been deleted or is damaged.
    I assume you will have to reinstall Mail.app.
    First try to open the Application from it's icon in your Applications folder. Does it open? Is the original application missing from the Applications folder?
    littleshoulders

  • Question-Mark For CSH doesn't appear

    Hi. I'm trying to run a context-sensitive help system for a web-based applet. When I run CSH using an application interface, the cursor changes to a question-mark and I'm good to go. But when I'm running it from the applet, the cursor doesn't change when I run CSH. Has anyone run into this problem? I'm running JRE 1.4.1_05, and have also tested this on 1.4.2_08.

    Hi Manisha,
    There is a global setting for TR management. In your case the standard tr mechanism is set to OFF. You would not get prompts when you create new objects. If the tr mechanism is set to ON, then you would get prompts when you create objects.
    To set Std Tr mechanism to ON, goto Transport connection tool, Edit menu --> Transport --> Switch-On Standard.
    Please note that this setting is not just for queries but for all objects. You will have to logoff and login after the setting change is done.
    Edited by: Murali Krishna K on May 18, 2011 1:01 PM

  • Help! Blinking folder with question mark and Mac Logo

    Out of nowhere when I turned on my Powerbook G4 laptop the other day, the sound chimed like it was turning on, however instead of loading up, I saw a blank screen with a little file folder in the middle and the icon on the folder changed from a question mark to the mac logo back and forth. I have no idea what to do here. Help please!
    Thank you.
    I already tried rebooting, taking out the battery and putting it back in. Nothing has worked so far.

    Not from doing what I've suggested. The computer has basic instructions on the chip which tell it what to do next after you press start - i.e. start OSX from a particular place on the hard drive. Hopefully, what I've suggested will enable the machine to do that and wall will be well
    It is possible that your hard-drive has failed or is about to fail - I advise as soon as you can get the machine started to back-everything up.
    If it does not start, you may have a hard drive failure. In which case you can try several tools which may manage to get the drive back up, or at least recover the data. If you are near an Apple Store, you could go in and see if they can start the machine from a Firewire External drive with OS X on it - they may be able to see some of the data and copy it for you.
    But try what I suggested first and let's see what the issues really are before going into disaster mode
    Best of luck.

  • TS2570 i have an intel imac and im getting a grey sceen. I get the flashing question mark folder. iv changed the H.D 2x and tired to install a new os into it but no luck. The mac isnt going into safe mode or anything. help?

    Intel imac 2009. Grey screen with question mark folder. Changed harddrives 3 times now. Tired 5 keyboards on all Usb ports and a hub and keyboard wont boot to startup or safemode of anything but hub gets power. disc drive wont eject or accept a disc cuz keyboard commands not being sent to computer. Help?

    Keyboards must be connected directly to the USB port, not through a hub.
    Reinstall OS X without erasing the drive
    Do the following:
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Reinstall Snow Leopard
    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    Download and install the Combo Updater for the version you prefer from support.apple.com/downloads/.

  • I changed my hard drive and when i turn on my laptop i just get a question marked folder.

    how do i fix this? how do i get my new harddrive to work with my computer so i can install the operating system? ive changed my harddrive from a 2009 macbook, and had no problems. it would load up and take me to a menu in which i would have to format the harddrive to work with the operating system and such. this time when i start up the computer with the new harddrive i just get the blue/grey screen and an opaque folder icon with a question mark on it. i assume that means it cant find the drive, but how do i fix this? ive checked to make sure that the sata connection is in poperly and that the harddrive is properly secured in its place.
    i have a 2nd gen macbook pro 15"
    thanks for the help

    heres what i did:
    i replaced the harddrive
    turned my mac on - got the image
    turned it off
    turned it back on and inserted the snow leopard disk - got the same image
    turned it off and back on but kept getting the same image.
    when i did it for my 2009 white macbook i did it with the snow leopard disk.
    i also tried to eject the disk but it wouldnt eject it. im currently on vacation and am nowhere near a macstore, so i cannot go to a genius bar. im also not the most computer savvy guy, but i know how to get my way around. anything else i can tell you to provide you with information on what ive done so far?

  • Special characters are changed to question marks

    I'm using SQL developer 3.107 for unit testing.
    In a particular unit test, the expected result is a sentence (varchar2) with a special character (ë).
    But when I save the result, SQL developer changes the character to 2 question marks.
    And as a result, the unit test fails because the expected result differs from the received result (where the 'ë' remains unchanged).
    I already tried changing the encoding in the SQL Developer preferences from cp1252 to UNICODE and UTF8 but that didn't help.
    Any suggestions?
    Thanks in advance

    Hello:
    I guess that what you observe could be an interaction between the server characterset and the client characterset.
    These are the results with different client characterset settings:
    NLS_LANG=american_america.WE8ISO8859P1
    select 'ë' c, dump('ë') dumped from dual;
    C DUMPED
    ë Typ=96 Len=1: 137
    NLS_LANG=american_america.WE8MSWIN1252
    select 'ë' c, dump('ë') dumped from dual;
    C DUMPED
    + Typ=96 Len=1: 191
    set NLS_LANG=american_america.WE8PC850
    select 'ë' c, dump('ë') dumped from dual;
    C DUMPED
    ë Typ=96 Len=1: 235
    According to the ISO 8859-1, 8-bit single-byte coded graphic character sets document [http://www.open-std.org/JTC1/SC2/WG3/docs/n411.pdf] the encoding of the latin small letter e with diaeresis is 0xEB -> (decimal 235).
    If you set the client to WE8PC850 do you see a correct behaviour?

  • All of the menus on my macbook pro how a question mark inside a rectangle.  It looks like unsupported characters.  How do I change it back to regular text?

    On my early-2011 MBP running Mavericks, all of the text of menus has turned into a question mark surrounded by a rectangle.  As a result, I cannot read any menus.  What do I do to change the character set the OS is using back to a normal charset?

    Startup in Safe Mode. http://support.apple.com/kb/PH14204
    If this does not help, reinstall OS X.
    Reinstall OS X  10.9 Mavericks
    http://support.apple.com/kb/PH13871

  • How can I change the state for normal. All I get is a question mark.

    I can't change the normal state for my site. The button for color of text for the normal state is a question mark. Is there a way to reset this?

    Thanks. I am trying to change the appearance of a hyperlink on a web page. Specifically, I want to change the default text color from blue to another color. I can change the color for the other states of the hyperlink (rollover, etc.) but the attempt to change the normal state of the hyperlink is unsuccessful because the color box for that state is a question mark. Bill

Maybe you are looking for

  • Delta records are not loading from DSO to info cube

    My query is about delta loading from DSO to info cube. (Filter used in selection) Delta records are not loading from DSO to Info cube. I have tried all options available in DTP but no luck. Selected "Change log" and "Get one request only" and run the

  • How to make my wifi work . I'm using HP PAvilion G series Windows 7

    can somebody teach me how to make my wifi work. The guy from the place where i asked them to fix my laptop told me to download drivers from sites. and he gave me a list of drivers. But i lost it.. but then. I have downloaded almost all except for the

  • No records in source

    Hi Ipsita, Instead of the below. Use if [ -z filename ] if [ `ls -l $SOURCE_FILE | awk '{print NR}'` -eq 0 ] Let me know what you find? Thanks,Deeshan

  • Channel Strip Settings Menu

    Logic 7.2.3 on page 272 of the logic reference manual it says "if you click on the word Insert on any channel strip, the channel strip settings menu opens." unfortunatley that does'nt happen for me. any thoughts? dual g4   Mac OS X (10.4.6)  

  • QuickTime RTSP works on AirPort but not Wired Networks

    I have a 10.4 X-Serve in a remote data facility running the QuickTime Streaming Server. I also have a C2D MacBook Pro 17" running Leopard with both QT Pro and the QT Broadcaster on it. When using AirPort to connect to the internet, the Broadcaster do