Problem with the "\" character.

Hello
Why I can not compile the folowing source (very short) :
public class Test4 {
char tmp = '\u005C';
public static void main(String args[]){
the error is :
src/Test4.java:2: unclosed character literal
char tmp = '\u005C';
^
1 error
The problem is the same with javac and jikes.
FYI, the 005C is the "\" character. If I use an other one, no problem, I can compile and run the .class file.
Anyone can help me ?
Best regards from Bordeaux, France.
K96

ok, you're right. But, my problem is a little bit different :
I would like to replace the "\n" character (new line) by the 2 characters "\n".
I test this source code :
String tmp = "First line\nSecond line";
tmp.replaceAll("\n", "\u005C\u005Cn");
System.out.println(tmp);
tmp.replaceAll("\n", "\\n");
System.out.println(tmp);
tmp.replaceAll("\n", "\\\\n");
System.out.println(tmp);
The 3 results are the same :
First line
Second line
I never have "First line\nSecond line".
Best regards.
K96
PS : The objective is to write the string in a SQL request.

Similar Messages

  • Adobe forms - problem with the character "9"

    I have the problem with printing Adobe forms that were introduced with Russian country version.
    Funny enough I have no problems with russian characters. They all print all right.
    We have however the problem with character "9". On the preview of the pdf it looks ok. When I print it from PDF preview it prints ok. But when I process it for sap to the HP output device (device type HPLJ4) "9" gets replaced with "<".
    Has anyone experienced this problem?

    ok, you're right. But, my problem is a little bit different :
    I would like to replace the "\n" character (new line) by the 2 characters "\n".
    I test this source code :
    String tmp = "First line\nSecond line";
    tmp.replaceAll("\n", "\u005C\u005Cn");
    System.out.println(tmp);
    tmp.replaceAll("\n", "\\n");
    System.out.println(tmp);
    tmp.replaceAll("\n", "\\\\n");
    System.out.println(tmp);
    The 3 results are the same :
    First line
    Second line
    I never have "First line\nSecond line".
    Best regards.
    K96
    PS : The objective is to write the string in a SQL request.

  • Boolean Search problem with the "&" character

    I need to perform a Boolean search and include names such as "John Wiley & Sons", "R & D", for example, that have the "&" character in it. The problem is that Acrobat considers the character "&" as an "AND". I have tried to use "\&" but it didn't work. Does someone know if it is possible to consider "&" as a character, instead of a logical operator, in a Boolean search, and if yes, how?

    I've already done it.
    Do you think this will help?
    I doubt that Apple will listen to us. Users with a problem that occurs quite a lot.

  • Printing problem with the character u00D8

    Hi SAP Experts,
    I have a very unique problem while printing the character Ø thru the Quality Reports.
    I am able to see the said character in print preview of the quality report. I am able to see the same character stored in the respective table.
    But it is not getting printed on the paper when I take a print out of the report. I took print out on various printers. But result is same.
    What will be the reason for such error? It is due to printer setting or SAP internal issue?
    Please guide me.
    Thank You
    Shailendra

    Hi Suhas,
    Pls. refer SAP Note
    Note 535936 - Printing Windows-1252 special characters
    Best regards,
    Prashant

  • URGENT Problem with Greek Character from an Oracle database

    Hello, I am having a serious and urgent problem with the character settings of an oracle database (8.1.7). The database is sitting in a solaris unix server and when we run the env command we have the following in the NLS_LANG parameter: AMERICAN_AMERICA.WE8ISO8859P1 (I do not know if this is helpful). When I retrieve data from oracle database (through a VB.NET 2005 program)to a dataset I use a special font in order to see the greek characters (HELLASARIAL). But when I am trying to save these data to a TXT file the greek characters are like Chinese to us. I tried several encodings (System.Text.Encoding.GetEncoding(869)) but without success. Can someone tell me how to convert the oracle greek characters during the selection or during the saving to the TXT file?
    Please respond as fast as you can.
    Thanks in advance

    Here is the answer of the microsoft:
    I have the information that you have a VB.Net 2005 application connected to an Oracle database 8.1.7.4 hosted on a UNIX server.
    This database has the CharacterSet WE8ISO8859P1.
    When retrieving Greek characters from this database in the application, you cannot see them.
    Could you please send me a screenshot of these characters in the .Net application?
    Are they displayed as gibberish, or as inverted questions marks (?)?
    I already had similar cases with Hebrew characters hosted on an Oracle database.
    These characters were displayed as questions marks on the client side.
    This is due to the fact that System.Data.OracleClient is using the Server CharacterSet to display the characters.
    If your Greek characters are not stored in the WE8ISO8859P1 characterset, then they won’t display correctly on the client-side.
    This is different from OLEDB where you could interact on client side by modifying the NLS_LANG parameter in the registry HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0.
    The client NLS_LANG and the server CharacterSet had to match in order to correctly display the data, and avoid SQL*NET conversion.
    So there are two solutions to your case:
    - The first one is to create a new database using the P8 characterset. The Oracle .Net managed provider will so be able to use it and display the characters correctly.
    - The second one is to use the OLEDB.Net managed provider, and then use OLEDB for Oracle provider. OLEDB will take care of the client NLS_LANG registry parameter.
    Would it be possible to test your application against an Oracle database with WE8ISO8859P8 characterset?
    Would it be possible to test it with the OLEDB .Net managed provider, and after checking the NLS_LANG client registry parameter?

  • Problem with the specail Character '&'

    Hi,
    I am facing problem with special character '&' in report files. When I run the report locally(report builder), i am getting the data printed with '&' correctly. But if I execute same report thr' the application, via application server, I am getting the data printed with "&:". It is not displaying &. Please suggest me how to overcome this problem.
    'ADP & Liablility' is printed as 'ADP & Liablility' in the web. We are not sending any value thr' the url. This is just a report title. Taking the value from the database and printing it.
    Appreciate the quick response.
    Thanks and Regards,
    A.K.Malathi

    Hi Andres,
    I've seen this situation before with several characters that don't display in certain fonts even though font.canDisplay(char) evaluates true.
    For example, Courier New (among many others) and \u20ac . (I don't know why this is?)
    Anyway, use the Ariel Unicode MS font and it will display.
    Regards,
    Joe

  • Problem with the special character '&'

    Hi,
    I am facing problem with special character '&' in report files. When I run the report locally(report builder), i am getting the data printed with '&' correctly. But if I execute same report thr' the application, via application server, I am getting the data printed with "&:". It is not displaying &. Please suggest me how to overcome this problem.
    'ADP & Liablility' is printed as 'ADP &: Liablility' in the web. We are not sending any value thr' the url. This is just a report title. Taking the value from the database and printing it.
    Appreciate the quick response.
    Thanks and Regards,
    A.K.Malathi

    Moderator: Off topic. This forum is for Java Collections API questions. Locking.

  • I am having a strange problem with the awesome bar

    The awesome bar/location bar is no longer as awesome as it used to be. When I start typing in an address it seems like it no longer checks through my history and gives a list of possible matches but just gives the stem of an address. For example, if I type in 'goo' it will complete this to 'google.com' if I then append this with an '/a' it will complete this to 'google.com/analytics' but that's as good as it gets, as I say, no list from the history or bookmarks.
    I've checked the options and also about:config and all the settings are as they should be, as far as I can tell (and I certainly hadn't changed any of them when it started misbehaving). I've also disabled all extensions and plug-ins.
    It's driving my slightly bonkers because I quite often use sites with long addresses and can't remember each of the components of each address. I'd switch to using Chrome but I also use Firebug a fair bit so don't really want to do this.

    Hi cowtan, <br/>Sorry you are having problems with the awesome bar.
    I imagine the new behaviour may be reversed by changing some pref but I have not looked that up.
    Regardless of the new behaviour you seem to have some fault as my awesomebar still gives bookmarked items.
    As a troubleshooting step try adding an asterisk in the awesomebar (as first character or anywhere) that should then filter the results in the dropdown list to bookmarked only items, does that work ?
    * see [[Search your bookmarks, history and tabs with the Awesome Bar#w_changing-results-on-the-fly]]_changing-results-on-the-fly
    You possibly have some extension interfering with the awesome bar, try Firefox in safe mode (but do NOT* at this stage try the Reset Firefox option)
    <nowiki>*</nowiki>'''edit''' - personal opinion, if a user; such as you; is knowledgeable enough to use ''about.config'' the easy solution of ''FirefoxReset ''is probably not the best route, as it can have unwanted side effects that are avoidable.
    * [[Troubleshoot Firefox issues using Safe Mode]]
    Do your bookmarked items appear in safe mode ?
    <u>Try a new Profile.</u><br/>The best method for troubleshooting this will be to set up a new Firefox profile, you can then: experiment, troubleshoot, alter settings or extensions installed in that profile without changing and potentially damaging your current profile.
    * http://kb.mozillazine.org/Profile_Manager#Creating_a_new_profile
    I suggest to prevent unexpected problems you
    * use a sensible name such as test 2012 for the profile name
    * ensure an empty folder is used & do not then rename or delete the new profile (instead add or delete shortcuts to it)
    * also see http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • Problem with the Non-English Characters

    Hello,
    I have been using Adobe Illustrator  but I have a huge problem with the non-english characters with Standart Fonts. With the Professional font's I have no problem with them. But when I'm using any standart font in font folio library I cannot type any "ğ-İ-ş". I can add those letters in fontlab with the glyphs (scedilla, idotaccent, gbreve). Most of the fonts have those letters already prepeared so I dont even have to redraw. But I can't add those glyph to every single font because I dont have that kind of time and patience. Is there any better solution for this? Or is there any font folio pack that all fonts are PRO.
    I'm looking forward for your answers
    Thanks.

    Joel wrote: I'm told that this is the exact difference between Adobe's Standard and Pro fonts — the Pro fonts have additional glyphs, including those necessary for extended Latin script.
    Exactly. The Pro fonts have at a minimum the Adobe Western 3 character set, which is essentially western European + Adobe CE.
    > Standard fonts just have the basic English character set, with maybe a bit of help for Spanish and French.
    A lot more than that!
    > You're doing Turkish, right? Adobe's coverage for Turkish in its fonts is not great - some of the Pro fonts have Turkish coverage, many do not.
    This is false. Every single Adobe Pro font supports Turkish.
    To be clear:
    All Adobe Standard fonts support the following languages: Afrikaans, Basque, Breton, Catalan, Danish, Dutch, English, Finnish, French, Gaelic, German, Icelandic, Indonesian, Irish, Italian, Norwegian, Portuguese, Sami, Spanish, Swahili and Swedish.
    Adobe Pro fonts support those languages, plus AT LEAST: Croatian, Czech, Estonian, Hungarian, Latvian, Lithuanian, Polish, Romanian, Serbian (Latin), Slovak, Slovenian and Turkish. Some Pro fonts have more language support than this, such as Greek and/or Cyrillic, and additional extended Latin.
    See: http://www.adobe.com/type/browser/info/charsets.html
    Cheers,
    T

  • Problem in the character conversion

    Hi Guys,
    I am facing problem in the character conversion
    I am posting data from SAP to third party system using XI , by converting whole input message to a String .I am using SOAP adapter to communicate XI to third party system.
    Thirdparty system needs String to be wrapped in CDATA so that it will not choke by looking at the special characters. I did Wrap the output string in CDATA, using ABAP mapping but when I do that XI is converitng  arrow brackets < and >. into &lt and u2018&gtu2019   my assumption is it is double encoding.
    example -
    before map -  <AppSystemInfo>
    after mapping  it is converted as -  <![CDATA[ &ltAppSystemInfo&gt]]>
    Edited by: Vamsi on Jun 17, 2010 10:00 PM
    Edited by: Vamsi on Jun 17, 2010 10:01 PM

    Did you try to see the output?
    bcz if you are trying this in mapping testing it will show you like this as this conversion if for xml, so xml will not do anything wrong with the special characters, so for that special characters will be converted like that.
    Once try to run end to end interface and try to see at receiver side that how data looks like.
    Thanks,
    Hetal

  • Problem with a character in an external table

    I have Unix Sun OS 5.8
    I received 1 file with data. The problem is that this file has a character ' ' in the end file then the charge has an error. The character in the end file is in hexadecimal: 0A, 1A.
    Then I have an External table and I put the the clause LOAD WHEN (COMARC != ' ') but when I edit the external table I see LOAD WHEN (COMARC != '.').
    And the last record with the ' ' character doesn’t filter.
    Note: the character isn't a space ' '. It is the hexadecimal: 0A, 1A
    What I have to put in the LOAD WHEN (COMARC != '??????????') to filter this character?

    I put LOAD WHEN (COMARC != x'0A1A') but I receive the error:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "single-quoted-string": expecting one of: "and, not, or, )"
    KUP-01007: at line 3 column 26
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    If I put:
    LOAD WHEN (COMARC != ' ') for example I don't received any error!
    What happens?
    Thanks!

  • SAPScript printing of PO form in ECC 6.0 with the character #

    Hi,
    We had just upgraded our system from SAP 4.6C to ECC 6.0. After the upgrade, we had encountered an issue during the printing of a purchase order. Apparently, when the PO has a text with the # character, the whole text doesn't appear. However, if we remove the # character, the rest of the text is printed.
    This problem only occurred in ECC 6.0. It was not happening when we were still in 4.6C.
    Can you please advise?
    Thanks and regards,
    V

    Hi Binod,
    Thanks for your response. Let me try to explain the problem more clearly.
    In the PO printout, we have placed there a text i.e. MN #149. When we were still in 4.6C, the text is displayed completely including the # character. But when the system was upgraded to ECC 6.0, the whole text did not appear.
    Now, we tried testing by removing the # character and the PO was printed with the text MN 149. However, we still need to have # character in the PO printout.
    Hope the issue clear. Can you please assist?
    Thanks,
    V

  • I just order 8 calendars from iPhoto and they came to me fine. Now I need to order two more but when I go thru the process I get a message  saying:unable to assemble calendar. There is a probleme with the photo with the file name"(Null)"   more........ .

    Would someone be able to explain to me the following issue with Iphoto?
    I ordered 8 same calendars for my soccer team and received them fine. Although a couple of pictures on it are a little off (out of focus). I need to order two more of the same calendars but when I go thru the process ireceive an error message saying:
    "Unable to to assemble  calendar" There is a problem with the photo with the file name "(Null)" The full resolution version of this photo either cannot be located or is corrupt. Please replace this photo or delete it from your calendar.
    How can  I fine this "corrupt" photo? How did it go thru with the first batch of calendars but won't go thru now?
    Thank you for your help.   

    Apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start
    with Option #4 and then #1 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • I can not upgrade to quicktime 7.7.3 for windows vista.  Error message says there is a problem with the program installer.  Any clue as to how to get around this.

    I can not download quicktime 7.7.3 for windows vista.  The error message says that there is a problem with the windows installer.  Any clues?

    The error message says that there is a problem with the windows installer.
    What's the precise text of the message, please? (There's a few different ones I can think of that you might be getting.)

  • I have a problem with the sync between iTunes and ipad2. I can not see the files in iPad. Help me please.

    I have a problem with the sync between iTunes and ipad2. I can not see the files in iPad. Help me please.

    Cannot see what files ? Music (synced music should appear in the iPod app), films/TV shows (Videos app), documents ... ?

Maybe you are looking for