Saving a file in a with a file name containing Japanese Characters

Hi,
I hope some genius out there comes up with the solution to this problem
Here it is :
I am trying to save some files using a java program from the command console , and the file name contains japanese characters. The file names are available to me as string values from an InputStream. When I try to write to a File Object containing the japanese characters , I get something like ?????.txt . I found out that I am able to save the files using the unicode value of the java characters.
So I realize that the trick is to convert the streaming japanese characters , character by character into their respective unicode value and then Create A File Object with that name. The problem is -> I cant find any standard method to convert these characters into their unicode values. Does anyone have a better solution ? Remember , its not writing japanese characters to a file , but creating a file with japanese characters in the file name !!!!
Regards
Chandu

retrive a byte array out of the input Stream and store the values in String using the condtructor
String(byte [] bytes, String enc)
where encoding would be Shift_Jis for japanese I guess.
Now to understand this concept basically all the Strings are unicode however when you are passing a byte array String has no means to know what is the encoding of the byte array, which is being used to instantiate the String value so if no encoding is specified it takes the System value which is mostly iso-8859-1. This leads to displaying ?
However in case you know the encoding of the array specifying that in the constructor would be a real help.

Similar Messages

  • Since changing our computer I have been unable to download ebooks to my Reader Library I get a message Some file types associated with EPUB files are not associated with Reader Library; Waterstones suggest that I may have accidentally created a new Adobe

    When I try to download them from the Waterstones website I get a message saying:
    ‘Some file types associated with EPUB files are not associated with Reader Library.  Do you want to associate them now?  When I reply yes I get another message; ‘Configuration error unable to update EPUB files check network firewall and try again’.
    The ‘books’ are saved in the Download directory and I can’t transfer them from there to my E-Reader. I have not had any problems before, it was very simple; I saved the download and it automatically went into the Reader Library.
    I contacted HP and they said it is a software error and suggested I contact Waterstones.  I contacted Waterstones Customer Support and got the following response:
    As the error message is specifically mentioning the firewall it does sound like something in the firewall settings is stopping the download from taking place correctly. However, the files should not be being saved to the Download folder. It would be worth trying again by going to your Digital Order History on your Waterstones.com account and pressing the download button, and then making sure to press "Open" not "Save". When you press Open rather than Save it should give the option to open the file with Adobe Digital Editions. If the firewall message still comes up then I'm afraid something is blocking it on your end.
    If the above "Open" download method works but you then still get an error message it could possibly be that you have accidentally created a new Adobe ID when setting up on the new computer, rather than signing in with your old Adobe ID. It would be worth trying the aforementioned download technique again first, but if problems did still persist it would be worth calling Adobe themselves on 0207 365 0735, as they should be able to sort out any account issue.
      In response to the first para of Waterstones email I already do what they suggest I do press ‘Open’ not ‘Save’ but I don’t get the open with Adobe Digital Editions (we have installed Adobe Digital Editions on the new computer. Waterstones say we may have ‘accidentally created a new Adobe ID when setting up the new computer’ does that mean that we shouldn’t have installed Adobe Digital Editions on the new computer as it would have already been there? How do I sign in with my old Adobe ID? 

    Hi all after attampting to get some supoport from adobe by phone.... nice people infurating policys as far as support for digital editions or DRM is conserned... However I got no where with support.
    I ended up instaling Digital editions on my desktop PC and going through the motions of registering and borrowing a book then returning it. Then I trying on my iPad, Bluefire worked, Over drive did not so I completely removed Overdrive and reinstalled and re registered. all working now.
    Maybe some one at adobe did something. Maybe the install of the adobe DE client on a PC corrected what ever was out of wack with my account. Mayby the server that my account lives on did a scan disk and corrected a bad clustrer.
    What ever happend My account is actiove and working again. hope this helps others.

  • My NEF files were replaced with XMP files

    After processing my NEF files in Adobe PE's Camera RAW 6.5, my NEF files were replaced with XMP files.  I checked the Recycle Bin and they are not there.  I did nothing different from the past, using Open Image to move the file into the Editing module of PE.  Is there a natural place they would have gone?

    An alternative aproach would be to import as DNG instead of leaving the RAW files in native Nikon NEF format.  DNG can be saved with any adjustments made in ACR, and does not need the XMP sidecare file.  It is also a good idea to do any file moving from within Bridge so as not to lose track of any sidecar files.  I don't use Lightroom, but would imagine file management is even more important with Lightroom.
    BTW  I am surprised that other than Noel's underlining the fact that you are using Elements, that no one has asked why you are asking in a Photoshop forum.  Not that you aren't welcome Don.

  • When I delete com.apple.audio.SystemSettings.plist my audio/sound problems are solved. However when the file is replaced with another file, the sound is crappy and the quality is reduced. Can you please help me?

    When I delete com.apple.audio.SystemSettings.plist my audio/sound problems are solved. However when the file is replaced with another file, the sound is crappy and the quality is reduced. Can anyone please help me?
    Sincerely,
    Eric

    Run this when you have the problem and post the results here.
    EtreCheck
    This will tell us what is loaded

  • Spotlight has stopped working properly. Even when a known file is entered (with full file name) in search, it fails to find it. Any ideas?

    Spotlight has stopped working properly. Even when a known file is entered (with full file name) in search, it fails to find it. It finds some things, but is not to be depended upon. Any ideas?

    Try reindexing spotlight: Spotlight: How to re-index folders or volumes - Apple Support
    If you still have problems, open Console app, select All Messages, then search for mds in the search field. Then search for mdworker. See if there are any messages indicating it is having problems with certain files.
    You can also delete the index altogether and cause it to reindex with a command in Terminal. I have always assumed the method above will do the same, but I'm not certain. You must run this command while  logged into an admin account. Copy the whole line and paste it into Terminal.
    sudo mdutil -E /
    sudo temporarily elevates your privileges and will ask for your password. When you type it in, there won't be any response in the Terminal. Just type it and hit return.

  • Library files files are replaced with new files

    Almost everyday, when i start iTunes my library files are replaced with new files & then i need to replce the new ones with my backup set

    There are a couple of recommended methods for using more than one iPod on a single computer. Method one is to have two Mac or Windows user accounts which by definition would give you two completely separate libraries. Each account has it's own iTunes folder, Library and iTunes Music folder and you load it with CDs etc just as you did with your original one.
    Method two is to set your preferences so that either one or both iPods get updated with only certain playlists within one library. Have a look at this article and see what you think and go for whichever you feel suits your needs best: How To Use Multiple iPods with One Computer
    Another option when using a single library is to set one or both of the iPods to manual update: Managing content manually on iPod
    Choosing the update option "automatically update selected playlists only" (called Sync Music - Selected playlists in iTunes 7) allows you to create a playlist specifically for each iPod and drag the tracks you want into it. If you tire of the list and want to change it, you just add or remove the songs you don't want. The ones you take out out remain in the library to be used by the other iPod. Make your playlist a Smart playlist and limit the size to just below the advertised capacity of your iPod ( for example, around 3700MB for a 4GB or 1800MB for a 2GB Mini or Nano). You can read more about playlists at these links:
    iTunes: Creating playlists of your favorite songs
    How to create a Smart Playlist with iTunes

  • Saving changed services in Automator with a new name.

    Under SnowLeopard I could open an existing workflow, make some changes to it and save it as a new workflow service. In Lion there is no SAVE AS, so this procedure doesn't work.
    I tried duplicating the workflow in the Finder and renaming it and opening it in Automator. The problem is; after making the changes and saving it, Services show it with the original name. That means both the original file and the duplicated/renamed file show up with the same name.
    Is Automator creating an internal name for the file that can't be changed?
    I had a service that moved files from one location to another. I created 5 duplicates of it and renamed them with the new location as part of I wanted to move file to. I made the changes to each with the new location as the place to move the selected files.
    Now Services show six services with the original name and none with the new names.
    Is anyone else having the same problem? I wish there were a way to force applications to do a SAVE AS.
    I have also noticed that the DUPLICATE TO... doesn't give you an option to have to duplicated a new name.

    For me the following works:
    Open the servce you want to modify in Automator.
    In Automator duplicate the workflow with File -> Duplicate.
    Edit the duplicate.
    Save it with File -> Save. You will be prompted for a new name.
    Install the new service in ~/Library/Services and remove the old version.

  • How to upload file containing Japanese characters in AL11

    Hi All,
    I'm trying to modify a program that extracts a text file from local drive then upload the file to sap directory. The input text file contains Japanese characters. When I view the file created, it looks like the one below:
    #º#®#~#^#ì#q  ¼ÓÔ¼·Ï·º
    #ì#ç#ß#q  ÐÅÐÁÂÞº
    The code that I am fixing is below:
       open dataset pv_name for output in text mode encoding non-unicode
       ignoring conversion errors.
    open dataset pv_name for output in legacy text mode code page '8000' ignoring conversion errors.
    *OPEN DATASET pv_name FOR OUTPUT IN TEXT MODE ENCODING UTF-8 WITH BYTE-ORDER MARK.
        if sy-subrc = 0.
        LOOP AT pt_input.
          TRANSFER pt_input TO pv_name.
          IF SY-SUBRC NE 0.
            WRITE:/ 'Error writing file'(011), pv_name.
            STOP.
          ENDIF.
        ENDLOOP.
       endif.
      Close dataset
        CLOSE DATASET pv_name.
    Any suggestions on how to resolve this one?
    Thanks a lot in advance.

    I didnt said that this will resolve your errors. But using this is the same of ignoring comiler errors....
    As you didnt said anything about codepages you're using no help is possible, you didnt mentioned if your SAP system is Unicode, Non-Unicode or even a MDMP system.
    You need to figure out which codepage the file has on the presentation server and which codepage your SAP system is using. And it can be that no conversion is possible cause both systems do not have any character in common.

  • Error occured while importing xsd.file(Name contains invalid characters: -

    Hello,
    i muss import xsd.file.  while importing this error occured:
    İFMEXTDEF CCTS_CCT_SchemaModule-2.0 | http://example.org/XXX/XXX/OUT/NOZ (SC_NOZ V001 of example.org):
    Name contains invalid characters: - .
    Only a(A)-z(Z), 0-9, and "_" are permitted
    This xsdfile name is CCTS_CCT_SchemaModule-2.0 but PI doesn't  accept "-". But i muss use this file because this file is standart. What can i do for this?
    Thanks
    Nurhan
    Edited by: Nurhan on Oct 18, 2011 11:22 AM

    HI,
      PI doestnt support special characters like '-'. first you need to change the file name as you specify '-'. to remove that and you have to give '_'. then uyou have to impot >XSD file into ESR under ExternalDefination.
    i hope this will help you.
    regards,
    ganesh.

  • File extension error with Excel files transferred to PC

    I am syncing files with my PC (Documents to Go).  I noticed that Excel files that were accessible and functioning prior to the first week in September no longer work (interesting coincidence with the update to Gingerbread).  I get a "'file.xls', is in a different format than specified by the file extension" message when I try to open any files modified by the Droid after that date.  The same error occurs if I use the Sync tool or access the files from my PC using Windows Explorer.   The files work fine if I email them from the Droid to the PC or if they were modified PRIOR to the first week of September.  I also notice that picture files (jpg) after that date can not be opened but work fine via email to my PC.   The file extension names do NOT change and the same error occurs when I upload to another PC.   How can I fix this problem?  I can only back up my files by emailing them........

    (testing update) 
    DataViz responded with a couple of suggestions, here is my response:
    Here are some additional tests I just completed which puts the cause back onto DataViz:
    I created a simple Excel file on my PC and saved it as an ‘.xls’ file. (test.xls)
    I synced it with my Droid and the file could be opened on my PC and the Droid. (I used both the Sync folder file and opening the file via Windows Explorer using the Mass Storage mode)
    I then opened the file on my Droid and saved it (no changes to the xls file were made) and then synced with my PC.  The error now occurred by both attempting to open the file in the PC ‘Docs to Go’ folder and via Windows Explorer. 
    I then emailed the same file.  I opened the email on my PC and saved the test.xls file.  It opened without errors.
    I did the test again using the latest Excel format ‘.xlsx’ with the same failure.
    I am running version 3.003 (961) Documents to Go
    Bottom line; when Excel files are ‘saved’ on my Droid in Documents to Go, they can no longer be opened on my PC by either Sync or Windows Explorer.  The same file works fine if mailed from Documents to Go.  Documents to Go is corrupting the file in some way that prevents the transfer of that file to another device.
    This still may be associated with the Droid OS upgrade, I am waiting for a response from DataViz...............

  • Audio files not embedding with .avi files in CS4

    I am working on a project in Premiere Pro CS4. I successfully captured with firewire a number of clips and the audio embedded with the clip ( one .avi file shows up in explorer under the project. When I went back into the project, first, there was no audio captured at all and I did'nt notice until I had captured half of the clips (45 minutes). I don't know what happened there. Now, the audio is attached to the .avi file, but is not embedded like the previous captured files.   Example First capture: File Name : Harlem 01.avi  audio is embedded   2nd Capture  Guilford 01.avi  and Guilford 01. Stereo 1.wav
    Why aren't the .avi files and the audio files embedded and combined as one file anymore?
    Thanks for any help.
    Jimi

    >Matrox card
    The comment I have often seen is to the effect that "a Matrox card makes a good door stop"
    For a Firewire transfer you don't need any "card" at all, only a Firewire port... usually on the motherboard
    That said... and you mentioning switching back and forth between different Matrox modes... I would guess that, yes, you selected a wrong option
    But, since I don't use Matrox, I have no idea what setting could be wrong (I do use a Pinnacle Dv500 via dual boot with WinXP to digitize some old VHS tapes before they stop playing... but once I had settings that worked to create AVI files that ARE Audio Video Interleave with everything in one file, I have never changed any of the Dv500 settings)

  • Toshiba File Manager - working with custom file extensions

    Hi Developers,
       I am trying to create an App that handle a specific file extension. I impelemented the required functionality in the Application.
      When someone clicks on the file (say .xyz file) in a Third-Party file manager like AstroFileManager or ES Explorer, Android launches my application with the proper Intent ( ACTION_VIEW). How ever, if I browse to that specific directry using Toshiba File Manager, I get a message saying "There is no associated application for this file type."
     I tried several things and no dice. Does anyone know how I can register a handler for a specific extension for TFM?
    Thanks,
    Windozer

      event.target.info.<yourvariablename>

  • Advantages and disadvantages of using only sequence files or working with sequence files in projects

    Hello,
    can anyone please tell me the advantage of using projects instead of just a sequence file? Do I need projects only if I have more than one sequence file?
    Thanks a lot!

    MGH,
    Projects are meant to help with organization of TestStand files, but with the intention of use as part of a deployment of your test system.  As the TestStand Reference Manual (page 2-5) puts it:
    "In TestStand, you can create a workspace to organize and access your development files. A TestStand workspace file (.tsw) contains references to any number of TestStand project files. A TestStand project file (.tpj) contains references to any number of other files of any type.
    Use TestStand project files to organize related files in your test system. You can insert any number of files into a project. You can also insert folders in a project to contain files or other folders."
    John B.
    Applications Engineer
    National Instruments

  • Convert Screen(spool) to PDF file sending mail with attach file

    Hi :
    I'd like convert spool list to pdf and sending file...
    so, I read thread about spool convert to PDF before,
    and know how to convert Spool to PDF file and send mail with attach file.
    but I have a problem.
    my solution as:
    step 1. Call function: "CONVERT_ABAPSPOOLJOB_2_PDF"
    step 2. Call function: "SO_NEW_DOCUMENT_ATT_SEND_API1"
    then, I got a mail with attached PDF file, but the PDF file display limited 255 line.( SO_NEW_DOCUMENT_ATT_SEND_API1 limited)
    I want to showing word is wider that 255.
    and then I find a manual method as:
    After program finished.
    Function Menu -> system -> List -> Send
    use Prog: "Create Document and Send"
    I use this prog sending mail and attached file ,
    PDF file do <b>NOT</b> have 255 word limit !
    finally. my question is, If I want sending mail as Prog: "Create Document and Send", how to do?
    which Function I have to use?...
    Please help me, Thanks!

    Hi,
    Check this sample code of sending spool as attachment to an email address..
    Parameters.
    PARAMETERS: p_email(50) LOWER CASE.
    PARAMETERS: p_spool LIKE tsp01-rqident.
    Data declarations.
    DATA: plist         LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: document_data LIKE sodocchgi1.
    DATA: so_ali        LIKE soli OCCURS 100 WITH HEADER LINE.
    DATA: real_type     LIKE soodk-objtp.
    DATA: sp_lang       LIKE tst01-dlang.
    DATA: line_size     TYPE i VALUE 255.
    DATA: v_name        LIKE soextreci1-receiver.
    DATA rec_tab        LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    Get the spool data.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
         EXPORTING
              rqident              = p_spool
              first_line           = 1
              last_line            = 0
              desired_type         = '   '
         IMPORTING
              real_type            = real_type
              sp_lang              = sp_lang
         TABLES
              buffer               = so_ali
         EXCEPTIONS
              no_such_job          = 1
              job_contains_no_data = 2
              selection_empty      = 3
              no_permission        = 4
              can_not_access       = 5
              read_error           = 6
              type_no_match        = 7
              OTHERS               = 8.
    IF sy-subrc <> 0.
      MESSAGE s208(00) WITH 'Error'.
      LEAVE LIST-PROCESSING.
    ENDIF.
    Prepare the data.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 0.
    plist-body_num = 0.
    plist-doc_type = 'RAW'.
    plist-obj_descr = 'Test ALV'.
    APPEND plist.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 1.
    DESCRIBE TABLE so_ali LINES plist-body_num.
    plist-doc_type = real_type.
    Get the size.
    READ TABLE so_ali INDEX plist-body_num.
    plist-doc_size = ( plist-body_num - 1 ) * line_size
                     + STRLEN( so_ali ).
    APPEND plist.
    Move the receiver address.
    MOVE: p_email  TO rec_tab-receiver,
          'U'      TO rec_tab-rec_type.
    APPEND rec_tab.
    IF NOT sp_lang IS INITIAL.
      document_data-obj_langu = sp_lang.
    ELSE.
      document_data-obj_langu = sy-langu.
    ENDIF.
    v_name = sy-uname.
    Send the email.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
         EXPORTING
              document_data              = document_data
              sender_address             = v_name
              sender_address_type        = 'B'
         TABLES
              packing_list               = plist
              contents_bin               = so_ali
              receivers                  = rec_tab
         EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
              parameter_error            = 5
              x_error                    = 6
              enqueue_error              = 7
              OTHERS                     = 8.
    IF sy-subrc <> 0.
      MESSAGE e208(00) WITH 'Error'.
    ENDIF.
    COMMIT WORK.
    Send the email immediately.
    SUBMIT rsconn01
    WITH mode = 'INT'
    AND RETURN.
    Thanks,
    Naren

  • PDF files keep coming with old file name not as current file name

    Hi,
    I have a problem when exporting InDesign docs to PDF with some documnets. If I change the name in the export dialog box, then every time I export this doc to PDF in the future this name keep coming, even when I change the name of the document or save it in a new name. This causes confusion, since sometimes the name is completely different from the InDesign file name. What can be done to tell InDesign to save the exported PDF file according to the current file name and don’t remember the old PDF file name?
    I was thinking of a script, is there a ready one to use?
    Thanks

    Thanks for the tips, very useful indeed.
    Though it is bit hard to have everyone in the studio follow them as a routine. I way I used to do this is to go to Save as command, with right mouse I choose copy the highlighted document name, then I choose cancel, then when I choose to export I'll paste the the name which is the current file name, this is good for me, but I wouldn't dream of having this as a routine for everyone in the studio.
    I was thinking it would be easy if I can find a script, since I don't know scripting, to do just that, i.e. have Indesign to copy the current filename of the document (whether by doing the same trick as I am doing or if there is a direct command to do that in the script), then the script will go to the export dialog box, paste that name, then I will go on with the normal export dialog box options.
    This script will be easier to have everybody in the studio to follow.
    Appreciate your help.
    Thanks

Maybe you are looking for

  • Compute function on interactive report

    Hi Every 1, I need some help with an interactive report i am trying to produce. What i am trying to do is use to compute function of an interactive report and add the actual count from a week (e.g. week 26) and add it to the forecast count of that we

  • Flash acvitation in internet explorer

    hello all, i am having abit of trouble with flash at the moment, i have noticed with internet explorer i have to click my flash .swf's first before i can use them to activate them, and i was wondering if there is any way of getting rid of this as i a

  • Blue ThinkVanta​ge button doesn't work after installing Win 7

    I upgraded the OS on my T510 from Windows 7 32-bit to Windows 7 64-bit, and now the blue ThinkVantage button does not work. I re-installed Rescue & Recovery, and it is working. Should I be concerned about the blue button? Is there any way to fix this

  • Re: ITS mobile on Intermec CK71 Screens sizes

    Hello Everyone.As of the problem we are using the Intermec CK 71 device with the Intermec browser . The problem is the custom screen sizes are not fitting to the screen exactly. An empty space is taken as many characters and the layout of the screens

  • HT1846 I can't locate the Quick Time 7 control panel to input my Pro code

    I have Windows Vista and downloaded Quick Time 7. I just bought the Pro registration code to upgrad to Quick Time 7 Pro. Apple explained to go into my Vista OS control panel to access the Quick Time control panel to plug in the purchased code, but it