URL File Encoding

Can anyone point me to a generic way to encode a file as a URL for example say the actual file name is: "C:/%test + test%/http%3A%2F%2Fshakiboy2.free.fr%3A80%2Fphotos%2Fap01%2F%2F02.jpg"
The below code does not work because it will put a '+' in the place of the space ' '.
File file = new File("C:/%test + test%/http%3A%2F%2Fshakiboy2.free.fr%3A80%2Fphotos%2Fap01%2F%2F02.jpg");
String encodedUrl = "file:///" + URLEncoder.encode(file.getAbsolutePath(), "UTF-8");
URL url = new URL(encodedUrl);
InputStream is = url.openStream();The above code has this exception:
java.io.FileNotFoundException: C:\%test+++test%\http%3A%2F%2Fshakiboy2.free.fr%3A80%2Fphotos%2Fap01%2F%2F02.jpg (The system cannot find the path specified)If I simply replace all '+' with ' ' that will not work because there is a '+' in the actual directory name.
If I simply replace all ' ' with '%20' before encoding the url, that will not work because it will encode the '%20's.

I guess if I RTFM'd I wouldn't have posted so quickly.
Here is the solution:
File file = new File("C:/%test + test%/http%3A%2F%2Fshakiboy2.free.fr%3A80%2Fphotos%2Fap01%2F%2F02.jpg");
URI uri = file.toURI();
URL url = uri.toURL();
System.out.println(url);

Similar Messages

  • Url char-encoding problem

    I am connecting to a web-server. The URL has Japanese characters embedded in it.
    When run from NetBeans 6.8 everything works ok.
    When run from the shell, the server appears to not understand the Japanese characters. For example, if the Japanese characters represent a user name, none of the names are ever understood.
    Default charset when run from IDE is "UTF-8".
    Default when run from shell: "Cp1252".
    I don't want a systemic solution [for example a command-line switch, or config file setting]. I want to control every IO stream's encoding manually.
    This is the test that comes closest to what I think should work:
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    OutputStreamWriter baosStreamWrt = new OutputStreamWriter(baos, utf8.newEncoder());
    BufferedWriter bufWrt = new BufferedWriter(baosStreamWrt);
    bufWrt.write(url_with_jp_characters);
    bufWrt.flush();
    ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
    InputStreamReader inStreamRdr = new InputStreamReader(bais, utf8.newDecoder());
    BufferedReader bufRdr = new BufferedReader(inStreamRdr);
    String faulty_url = bufRdr.readLine();
    URL webpage = new URL(faulty_url);
    URLConnection urlConn = webpage.openConnection();
    BufferedReader webIn = new BufferedReader(new InputStreamReader(urlConn.getInputStream(), utf8.newDecoder()));
    BufferedWriter response = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("/tmp/dump.txt"), utf8.newEncoder()));
    response.("checking the the url: ")
    response.write(faulty_url);
    response.newLine();
    while(true) {
      String webLine = webIn.readLine();
      if(webLine == null) { break; }
      response.write(webLine);
      response.newLine();
    response.close();
    webIn.close();
    ....Inspecting the response from the server in the file "/tmp/dump.txt":
    (1) the file is formatted "UTF-8".
    (2) the url, written in the first line of the file, is valid and a cut/paste into a browser works correctly.
    (3) many correctly formed Japanese words are in the response from the server that is saying: "I have no idea how to understand/(decode?) the user name you sent me in the URL."
    At this point I have a choice:
    (1) I don't understand the source of the problem?
    (2) I need to keep banging away at trying to get the url correctly encoded.
    Finally, how can I debug this???
    (1) It works in the IDE, so I don't have those debugging tools.
    (2) My terminal cannot display asian characters.
    (3) Writing output to files involves another encoder for the FileWriter which taints everything in the file.
    (4) I don't have a webserver to act as a surrogate for the real one.
    thanks.

    Kayaman wrote:
    rerf wrote:
    And I don't know why NetBeans allowed me to get around not using this command.Because of the default charset of UTF-8 that's set in Netbeans.I see that, but something more subtle was happeneing I think. I still don't fully understand. Here is my best explanation. Exact code:
    ....for(File f : files) {
      BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(f), utf8.newDecoder()));
      String jpName = in.readLine().split(";")[0];
      String jpNameForUrlUsage = URLEncoder.encode(jpName, "UTF-8");
      String dumpFileName = (outputDir + f.getName().split(".txt")[0] + "-dump.txt");
      BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(dumpFileName), utf8.newEncoder()));
      URL url = new URL("http://www.abc.cp.jp?name=" + jpNameForUrlUsage);
      URLConnection urlConn = url.openConnection();
    }....In my first post, I formed the complete url, then encoded it to utf-8 using ByteArray[Input / Output]Streams. But, my understanding is that you can't just encode Japanese characters to utf-8 and then append them to a url. A special method call is needed to transform the Japanese characters into something understandable by the URL (and its not as simple as just encoding the characters to utf-8). After posting, I actually made an effort to read all of javadoc for java.net.URL:
    java.net.URL
    The URL class does not itself encode or decode any URL components according to the escaping mechanism defined in RFC2396. It is the responsibility of the caller to encode any fields, which need to be escaped prior to calling URL, and also to decode any escaped fields, that are returned from URL. Furthermore, because URL has no knowledge of URL escaping, it does not recognise equivalence between the encoded or decoded form of the same URL. For example, the two URLs:
    http://foo.com/hello world/ and http://foo.com/hello%20world
    would be considered not equal to each other.
    Note, the URI class does perform escaping of its component fields in certain circumstances. The recommended way to manage the encoding and decoding of URLs is to use URI, and to convert between these two classes using toURI() and URI.toURL().....
    Then, it all made sense. I had already diagnosed that it was just the Japanese character part of the URL that caused the failure. And I remember reading that the Chinese were upset that they could not use asian characters in URLs. So, even though in my browser it looks like a Japanese character is in it, its really not. Chrome browser is doing some transform from what I see in my browser URL and what the actual URL is. That is why cutting/pasting the url I was forming in Java into the browser is not a good representation of what is going on. Chrome, behind the scenes does what the URLEncoder class does.
    Yet, I could very easily be wrong:
    On the one hand NetBeans worked, and the shell did not. The relevant difference being default charset.
    But on the other hand, in my initial post, I completely encoded that url into utf-8 using ByteArray[Input / Output]Streams. I am no expert on character encodings, but if the url I created in the initial posting is not utf-8 encoded then I need a few pointers on how to character encode.
    final thought:
    I can't just encode a Japanese character to UTF-8, append it to a URL, and expect it to work. A browser can make it look that way so its deceiving. That is why there is the class URLEncoder. I don't understand why NetBeans appears to invoke it for me without my knowledge. And maybe its not. Having the default charset as utf-8 might obviate the need for a URLEncoder() call (but I don't see why it should).

  • Safari doesn't open his own .URL files

    Hello
    I've adopted Safari for Windows at work due to the good experience I had with Safai on my Mac at home, but I almost immediately I found a serious bug:
    Safari for Windows creates ".URL" files perfectly like IE7, by dragging the icon on the left of the address into a folder (or the desktop). Everything' fine here. I use this functionality a lot!
    I just opened the .URL file and looks nice. Here's an example:
    \[InternetShortcut\]
    URL=http://discussions.apple.com/forum.jspa?forumID=1188
    The PROBLEM is that when I double click the ".URL" file Safari for Windows just created, Safari NEVER opens, instead opening IE7 !
    There must be a registry fix for this, because if I drag the icon into an opened Safari, it opens the link perfectly.
    Please tell me what I must change on the Windows Registry to fix this.
    Thank you in advance for your support, and keep up the good work!

    Replying to my own problem, I think I finally fixed it... by accident!
    After a lot of juggling with Control Panel->Add/Remove Programs->Set predefined browser, I finally managed to get IE7 out of the way, but only after deactivating access to Internet Explorer, and a lot of random checks and reboots along the way.
    I have no idea why Safari for Windows can't make himself the default browser on URL opening, but I believe you are missing some settings somewhere in the Windows Registry.
    Happy bug hunting!

  • I am trying to import my favorites from a Favorites folder that are .url files! Please help!

    Hi,
    So my old laptop died, and I saved my favorites from internet explorer as a Favorites folder (I took the harddrive out of my old laptop and dragged everything onto an external harddrive). I now have a new laptop and am trying to pull in all my favorites into Mozilla. I have already looked at all the help files on here, but it looks like they are only for importing .html files? I was looking at my saved favorites and it seems they are all saved as .url files. Any advice on how to get these into Firefox? I really really don't want to have to re-bookmark EVERYTHING.
    Thanks!

    Firefox can handle its' own json and sqlite format for bookmarks/places, and it can handle the universal bookmarks.html interchange format, but it can't deal with the Favorites .url format - that's unique to IE and its' clones. Get that folder of .url files back into Internet Explorer and then export that data as an HTML file.
    In IE: <br />
    File > Import/Export - Export to HTML file
    ''then in Firefox:'' <br />
    Bookmarks > Organize Bookmarks -> Import & Backup - Import HTML... = From HTML file

  • File encoding cp1252 problem

    Hi there,
    I have a problem concerning the file encoding in a web application.
    I'll sketch the problem for you.
    I'm working on adjustments and bug fixes of an e-mail archive at the company i work for. With this archive, users can search e-mails using a Struts 1.0 / JSP web application, read them, and send them back to their mail inbox.
    Recently a bug has appeared, concerning character sets.
    We have mails with french characters or other uncommon characters in it.
    Like the following mail:
    Subject: Test E-mail archief co�rdinatie Els
    Content: Test co�rdinatie r�d�marrage ... test weird characters � � �
    In the web application itself, everything is fine...but when i send this mail back to my inbox, the subject gets all messed up:
    =?ANSI_X3.4-1968?Q?EMAILARCHIVE_*20060419007419*_Tes?=
    =?ANSI_X3.4-1968?Q?t_E-maill_archief_co=3Frdinatie_Els?=
    The content appears to be fine.
    We discovered this problem recently, and a lot of effort and searching has been done to solve it.
    Our solution was to put the following line in catalina.sh , with what our Tomcat 4.1 webserver starts.
    CATALINA_OPTS="-server -Dfile.encoding=cp1252"
    On my Local Win2K computer, the encoding didn't pose a problem, so catalina.sh wasn't changed. It was only a problem (during testing) on our Linux test server ... a VMWare server which is a copy of our production environment.
    On the VMWare, i added the line to the catalina.sh file. And it worked fine.
    Problem Solved !
    Yesterday, we were putting the archive in production. On our production server ... BANG --> NullPointerException.
    We thought it has something to do with jars he couldn't find, older jars, cache of tomcat ... but none of this solved the problem.
    We put the old version back into production, but the same NullPointerException occured.
    We then put the "CATALINA_OPTS="-server -Dfile.encoding=cp1252" " line in comment ... and then it worked again.
    We put the new version into production (without the file encoding line), and it worked perfectly, except for those weird ANSI characters.
    Anyone have any experience with this?
    I use that same file encoding to start a batch, but there i call it Cp1252 (with a capital C) ... might that be the problem? But i have to be sure...because the problem doesn't occur in the test environment, and i can't just test in production ... and switch off the server whenever i'd like to.
    Does anyone see if making cp1252 --> Cp1252 might be a solution, or does anyone have another solution?
    Thanks in advance.

    First, I will start by saying that JInitiator was not intended to run on Win7, especially 64bit. So, it may be time to think about moving to the Java Plugin. Preferably one which is certified with your Forms version.
    To your issue, I suspect you need to change the "Region and Language" settings on the client machine. This can be found on the Control Panel. If that doesn't help, take a look at this:
    http://stackoverflow.com/questions/4850557/convert-string-from-codepage-1252-to-1250

  • Opening a URL/File in new window instead of new tab

    I think I know the answer to this, but I'd like to check anyway.  When setting an action to Open URL or File for a button/click box/hyperlink/etc, is there a setting in Captivate to open the URL/File in a new WINDOW instead of a new TAB? I know to use the "New" setting along with the Open URL or File action. I assume opening in a new window instead of a new tab by default is going to depend on the settings of whatever browser you use, but like I said, just wanted to check. Thanks!

    If you open it in javascript and specify a height/width or location it should open in a new window.
    window.open("http://www.adobe.com", "_blank", "toolbar=yes, scrollbars=yes, resizable=yes, top=500, left=500, width=400, height=400");

  • How to set File Encoding to UTF-8 On Save action in JDeveloper 11G R2?

    Hello,
    I am facing issue when I am modifying a File using JDeveloper 11G R2. JDeveloper is changing the Encoding of the File to System default Encoding (ANSI) instead of UTF-8. I have updated the Encoding to UTF-8 in "Tools | Preferences | Environment | Encoding" option and restarted the JDeveloper. I have also updated "Project Properties | Compiler | Character Encoding" option to UTF-8. None of them are working.
    I am using below version of JDeveloper,
    Oracle JDeveloper 11g Release 2 11.1.2.3.0
    Studio Edition Version 11.1.2.3.0
    Product Version: 11.1.2.3.39.62.76.1
    I created a file in UTF-8 Encoding. I opened it, do some changes and Save it.
    When I open the "Properties" tab using "Help | About" Menu, I can see that the Properties of JDeveloper are showing encoding as Cp1252. Is it related?
    Properties
    sun.jnu.encoding
    Cp1252
    file.encoding
    Cp1252
    Any idea how to make sure JDeveloper saves the File in UTF-8 always?
    - Sujay

    I have already done that. That is the first thing I did as mentioned in my Thread. I have also added below 2 options in jdev.conf and restarted JDeveloper, but that also did not work.
    AddVMOption -Dfile.encoding=UTF-8
    AddVMOption -Dsun.jnu.encoding=UTF-8
    - Sujay

  • Jinitiator 1.3.1.2.6 on win 7 64 and win xp (different file.encoding)

    Hello,
    our customer has moved from windows XP to Windows 7 and he uses Jinitiator 1.3.1.2.6...
    In some "Forms" I have implemented a PJC to save datas from clob to local file system..
    But there is a problem....
    If I run the same application with Windows XP I get file.encoding=Cp1250 which is ok....
    If I run the same application with Windows 7 (64) I get file.encoding=CP1252 and here is the problem...
    Is there any way to run Jinitiator (or set up file.encoding to/with) Cp1250?
    Maybe is this a local problem with windows?
    thank you..

    First, I will start by saying that JInitiator was not intended to run on Win7, especially 64bit. So, it may be time to think about moving to the Java Plugin. Preferably one which is certified with your Forms version.
    To your issue, I suspect you need to change the "Region and Language" settings on the client machine. This can be found on the Control Panel. If that doesn't help, take a look at this:
    http://stackoverflow.com/questions/4850557/convert-string-from-codepage-1252-to-1250

  • How to set the file.encoding in jvm?

    I have some error in showing Chinese by used servlet,
    some one tole me that I can change the file.encoding in jvm to zh_CN, how can I do that?

    Add the java argument in your servlet engine.
    e.g
    java -Dfile.encoding=ISO8859-1
    garycafe

  • File encoding in sender file comunication channel

    hello everyboy,
    i have a strange situation.
    2 PI 7.0 installation: develop and production. Identical. Same SP level, java vm, etc etc
    I have a interface file to idoc.
    File sender comunication channel are FTP and with content conversion.
    They are identical!!!!!!
    but....
    in production i added parameter File Encoding = ISO-8859-1 because if i have presence of strange characters....it work better.
    the same files...in develop installation, they work without this parameter.
    why?
    there are a place maybe in Config Tool or j2ee admin tool where is set this parameter?
    thanks in advance
    Edited by: apederiva on Mar 12, 2010 3:55 PM

    Hi,
    Make sure your both the systems are unicode so that you will not have any issues. Also please see this document for how to work with character encodings in PI. Also we dont have any special config in j2ee admin tool.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42?quicklink=index&overridelayout=true
    Regards,
    ---Satish

  • HOW SPECIFY FILE.ENCODING=ANSI FORMAT IN J2SE ADAPTER.

    Hi All,
    we are using j2se plain adapter,   we need the outputdata in ANSI FORMAT.
    Default file.encoding=UTF-8
    how to achive this.
    thanks in advance.
    Regards,
    Mohamed Asif KP

    File adapter would behave in a similar fashion on J2ee. Providing u the link to ongoing discussion
    is ANSI ENCODING possible using file/j2see adapter
    Regards,
    Prateek

  • URL file-access is disabled in the server configuration

    My hosting company has made a server config change and my xslt pages have stopped working with the following error.
    It says url file access is disabled but my phpinfo() still shows allow_url_fopen = on
    What else might be the problem?
    Warning: require_once() [
    function.require-once]: URL file-access is disabled in the server configuration in
    /homepages/0/xxx/htdocs/xxxx/inc/horoscope_xml.php on line
    3
    Warning: require_once(
    http://www.xxxx.co.uk/includes/MM_XSLTransform/MM_XSLTransform.class.php) [
    function.require-once]: failed to open stream: no suitable wrapper could be found in
    /homepages/0/xxxx/htdocs/xxxxx/inc/horoscope_xml.php on line
    3
    Fatal error: require_once() [
    function.require]: Failed opening required 'http://www.xxxxx.co.uk/includes/MM_XSLTransform/MM_XSLTransform.class.php' (include_path='.:/usr/lib/php5') in
    /homepages/0/xxxx/htdocs/xxxxx/inc/horoscope_xml.php on line
    3

    bikeman01 wrote:
    I don't understand your use of the word 'class' in your reply - I am using php not asp.net.
    The name of the file that you are trying to access is MM_XSLTransform.class.php. It is a PHP class created by Dreamweaver for the XSL Transformation server behavior.
    The servers php is 5.2.11, as it has been for sometime, so I know that it previously worked with allow_url_fopen = on and allow_url_include = off
    Judging from the error message, you are trying to include the file using a URL, rather than a file path:
    Fatal error: require_once() [
    function.require]: Failed opening required 'http://www.xxxxx.co.uk/includes/MM_XSLTransform/MM_XSLTransform.class.php' (include_path='.:/usr/lib/php5') in
    /homepages/0/xxxx/htdocs/xxxxx/inc/horoscope_xml.php on line
    3
    Change the URL to a file path:
    require_once('/homepages/0/xxxx/htdocs/includes/MM_XSLTransform/MM_XSLTransform.class.php');
    Is it possible for phpinfo() to show allow_url_fopen = on yet be actually off on the server?
    No.
    [Edited to correct name of server behavior]

  • Problem with URL File download

    Hi every one i am facing a problem with URL File read Technique
    import java.awt.Color;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.net.URL;
    import java.net.URLConnection;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JProgressBar;
    public class JarDownloader
         boolean isSuccess = false;
         public JarDownloader(String url)
              downloadJar(url);          
         public boolean isDownloadingSuccess()
              return isSuccess;
         private File deleteExistingFile(String filename)
              File jarf = new File(filename);
              if(jarf.exists())
                   jarf.delete();
              return jarf;
         public static void main(String args[]){
              new JarDownloader("url/filename.extension");
         private void downloadJar(String url)
              try
                   URL jarurl = new URL(url);
                   URLConnection urlc = jarurl.openConnection();
                   urlc.setUseCaches(false);
                   urlc.setDefaultUseCaches(false);
                   InputStream inst = urlc.getInputStream();
                   int totlength = urlc.getContentLength();
                   System.out.println("Total length "+totlength);
                   // If the size is less than 10 kb that means the linkis wrong
                   if(totlength<=10*1024)throw new Exception("Wrong Link");
                   JFrame jw =new JFrame("Livehelp-Download");
                   JPanel jp =new JPanel();
                   jp.setLayout(null);
                   JLabel jl = new JLabel("Downloading required file(s)...",JLabel.CENTER);
                   jl.setBounds(10,10,200,50);
                   jp.add(jl);
                   JProgressBar jpbar = new JProgressBar(0,totlength);
                   jpbar.setBorderPainted(true);
                   jpbar.setStringPainted(true);
                   jpbar.setBounds(10,70,200,30);
                   jpbar.setBackground(Color.BLUE);
                   jp.add(jpbar);
                   jw.setContentPane(jp);
                   jw.pack();
                   jw.setResizable(false);
                   jw.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                   jw.setLocationRelativeTo(null);
                   jw.setSize(220,150);
                   jw.setVisible(true);
                   int readlngth=0;
                   int position=0;
                   byte[] readbytes = new byte[totlength];
                   while(totlength-position > 0)
                        readlngth = inst.read(readbytes,position,totlength-position);
                        position+=readlngth;
                        jpbar.setValue(position);
                   File jarf = deleteExistingFile(filename);
                   jarf.createNewFile();
                   //FileWriter fwriter=new FileWriter(jarf,true);
                   FileOutputStream fout = new FileOutputStream(jarf,true);
                   DataOutputStream dout = new DataOutputStream(fout);
                   dout.write(readbytes);
                   dout.flush();
                   dout.close();
                   inst.close();
                   jw.setVisible(false);
                   jw.dispose();
                   isSuccess=true;
              }catch(Exception ex)
                   isSuccess=false;
    }From the above code i received the total length of the PAGE content (i.e here url is a file) when i tried to find the size of that file it return -1.
    please help me

    I think the real problem is that you don't check the return value from read (it's probably less than data.length indicating an incomplete read). Isn't there a readFully somewhere?

  • Text File Encoding used by TextEdit/OS X

    Hi all folks,
    does someone know the code page are used with the text file encoding "Western (EBCDIC US)"
    available from the "Customize Encodings List" in the TextEdit "Plain Text File Encoding" Preferences.
    The text file encoding "Western (EBCDIC Latin 1)" works well, but "EBCDIC US" does not,
    the character set is very limited.
    Thanks for any help,
    Lutz

    Yeah unfortunately they're all listed as 0kb files. I guess that means the faulty hard drive didn't transfer them properly, even though the Mac did the copy confirmation sound.
    Hundreds of folio files... all gone. ;___;

  • XI File Adapter Custom File Encoding for  issues between SJIS and CP932

    Dear SAP Forum,
    Has anybody found a solution for the difference between the JVM (IANA) SJIS and MS SJIS implementation ?
    When users enter characters in SAPGUI, the MS SJIS implementation is used, but when the XI file adapter writes SJIS, the JVM SJIS implementation is used, which causes issues for 7 characters:
    1. FULLWIDTH TILDE/EFBD9E                 8160     ~     〜     
    2. PARALLEL TO/E288A5                          8161     ∥     ‖     
    3. FULLWIDTH HYPHEN-MINUS/EFBC8D     817C     -     −     
    4. FULLWIDTH CENT SIGN/EFBFA0             8191     ¢     \u00A2     
    5. FULLWIDTH POUND SIGN/EFBFA1            8192     £     \u00A3     
    6. FULLWIDTH NOT SIGN/EFBFA2              81CA     ¬     \u00AC     
    7. REVERSE SOLIDUS                             815F     \     \u005C
    The following line of code can solve the problem (either in an individual mapping or in a module)
    String sOUT = myString.replace(\u0027~\u0027,\u0027〜\u0027).replace(\u0027∥\u0027,\u0027‖\u0027).replace(\u0027-\u0027,\u0027−\u0027).replace(\u0027¢\u0027,\u0027\u00A2\u0027).replace(\u0027£\u0027,\u0027\u00A3\u0027).replace(\u0027¬\u0027,\u0027\u00AC\u0027);
    But I would prefer to add a custome Character set to the file encoding. Has anybody tried this ?

    Dear SAP Forum,
    Has anybody found a solution for the difference between the JVM (IANA) SJIS and MS SJIS implementation ?
    When users enter characters in SAPGUI, the MS SJIS implementation is used, but when the XI file adapter writes SJIS, the JVM SJIS implementation is used, which causes issues for 7 characters:
    1. FULLWIDTH TILDE/EFBD9E                 8160     ~     〜     
    2. PARALLEL TO/E288A5                          8161     ∥     ‖     
    3. FULLWIDTH HYPHEN-MINUS/EFBC8D     817C     -     −     
    4. FULLWIDTH CENT SIGN/EFBFA0             8191     ¢     \u00A2     
    5. FULLWIDTH POUND SIGN/EFBFA1            8192     £     \u00A3     
    6. FULLWIDTH NOT SIGN/EFBFA2              81CA     ¬     \u00AC     
    7. REVERSE SOLIDUS                             815F     \     \u005C
    The following line of code can solve the problem (either in an individual mapping or in a module)
    String sOUT = myString.replace(\u0027~\u0027,\u0027〜\u0027).replace(\u0027∥\u0027,\u0027‖\u0027).replace(\u0027-\u0027,\u0027−\u0027).replace(\u0027¢\u0027,\u0027\u00A2\u0027).replace(\u0027£\u0027,\u0027\u00A3\u0027).replace(\u0027¬\u0027,\u0027\u00AC\u0027);
    But I would prefer to add a custome Character set to the file encoding. Has anybody tried this ?

Maybe you are looking for

  • How to get the outline of a "bordered" polygon

    Hi all, I wonder if it's possible with the standard APIs to get the outer shape of a polygon painted with a thick pen. In other words, I would like to get the shape that outlines my polygon when I draw it using a thick BasicStroke. Using the createSt

  • Problem in creating workbook

    Hi All, I have a problem in creating workbook. After inserting the query and saving as workbook, when the workbook is opened again there is no query inserted into it. Some values looks like alpha numeric values are populating. I'm using BEx 3.5 and M

  • Reporting Services 2014 ReportViewer.Webforms.dll

    So is Microsoft still only going to support Internet Explorer for printing? Any chance they will ever support Chrome?

  • How to get LR4 to open when inserting an SD card (MAC 10.8.2)

    I had LR3 opening when I inserted an SD card but when I installed LR4.4 it broke that and now I can't get LR4 to open when inserting a card. Still fairly new to MAC's so would appreciate any help.

  • CSS based layouts

    HTML DB's (even 2.0) layout features are based firmly on pure HTML tables. Rows and cells, rowspans/colspans. etc. Reading some of the bleeding edge web development sites/blogs out there, they have been proclaiming the death of HTML tables for page l