Problems on selecting views with french characters into column names

Hi All,
I have views with column names such as "Détermination Planimétriq" or "Année de construction:*";
I can get in my c# function this columns names from ALL_VIEWS dictionary table, but if I try to make a selectionby use of an OracleCommand, Oracle returns an "Invalid identifier" error:
SELECT "Détermination Planimétriq" FROM mytable;
System.Data.OracleClient.OracleException (0x80131938): ORA-00904: "Determination Planimetriq": invalid identifier at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at ...
Any suggestion?...

Be wary of using character codes outside the Western European "simple" alphanumeric [A-Z0-9] for object names, i.e. columns, table names, function and procedure names, and so on.
First reason, there is a 30 character limit for most object names, and characters that have to be spelled out with unicode characters take more space, i.e.:
select dump( 'Détermination Planimétriq'  ) from dual;
DUMP('D?TERMINATIONPLANIM?TRIQ')
Typ=96 Len=29: 68,239,[ ... ]Although the varchar string for that column name looks like 25 characters, it needs room for 29 to store the e<acute> character. And could also depend on the client settings. Using case sensitive names is not a best practice, its better to avoid specifying objects with the double quotes.
http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements008.htm#i27570

Similar Messages

  • Problem loading Image data with French accent in file name

    We have a very complex commercial application that has been working perfectly in English for over a year. We have now localized it to French and Spanish, and discovered a serious show-stopping problem. We need help fast, with the scheduled release being less than 2 weeks away...!
    We iterate over a folder to find all the images in it, then display those in a user window.  The code for loading the images is:
                for each (var name:String in filenames){
                    var image:SmoothImageTransformable = new SmoothImageTransformable();
                    var imagePath:String = dir + "/" + name;
                    image.source = imagePath;
                    trace("Adding Item to picture carousel with url " + image.source);
                    image.data = {directory:dir, filename:name};
                    image.isDragEnabled = true;
                    image.setStyle("horizontalCenter", 0);
                    image.setStyle("verticalCenter", 0);
                    _images.push(image);
    Our SmoothImageTransformable class is an internal class that inherits from Image.  This all works fine for image names like 'myFavoritePhoto', 'test', 'photo346', etc.  However, it fails to load the data if the file name is something like 'caméra'  Any name with a UTF-8 character causes the data load to fail.
    To be sure we weren't doing a load somewhere else in the code that I had overlooked, I added a "image.autoLoad = false' line in there.  That did exactly as expected -- all image squares then show a grey blank, with no image shown.  Removing that line (reverting to the original code, as shown above) causes all the images to work perfectly, except for those with French accent characters like the é.
    HELP!  Is this a known bug?  Is there some additional setting I need to make it understand the extended character set?  I can't find any mention about this at all in the documentation.

    @markerline:
    We have a fix!  Almost...   I don't understand one aspect of what I am seeing though.
    We have one test file named "camèra.jpg" that is an example of what I am unable to load into an Image.  I decided to examine the character codes at each letter, and this is what Flex has as the string:
    name = cam?ra.jpg
       [0] = c; 0x99
       [1] = a; 0x97
       [2] = m; 0x109
       [3] = ?; 0x232
       [4] = r; 0x114
       [5] = a; 0x97
       [6] = .; 0x46
       [7] = j; 0x106
       [8] = p; 0x112
       [9] = g; 0x103
    Note that the è prints as gibberish in the trace statement, and shows a numeric encoding of 0x232.  According to
         http://docstore.mik.ua/orelly/web2/action/appb_01.htm
    The unicode equivalent of Latin1 for è is 0xE8, which is equivalent to 0x232. That implies that the string is already Latin1, which I would think would mean that Windoze would recognize the file name and open it properly -- but it does not.
    I then tried taking the "camèra.jpg" string, pasting it into NotePad++ in a UTF8 document, then telling NotePad++ to display as ASCII.  The result is "camèra".  I then tried just forcing the file name within Flex to this new mangled string.  The result then is:
    MAGIC name = camèra
       [0] = c; 0x99
       [1] = a; 0x97
       [2] = m; 0x109
       [3] = ?; 0x195
       [4] = ?; 0x168
       [5] = r; 0x114
       [6] = a; 0x97
       [7] = .; 0x46
       [8] = j; 0x106
       [9] = p; 0x112
      [10] = g; 0x103
    Note this time the trace statement looks proper.  More important, the IMAGE DOES LOAD!  (Our display of the name to the user now looks like crap, but that just means I need to modify our class to have a separate 'name' property, rather than extracting it from the 'image.source')
    So... my remaining question -- what encoding did I just do through that NotePad++ incantation?  That site I quoted above said that it was already Latin1, which is what I thought I was trying to get to.  I clearly need to write a method to map from incoming (UTF8 I thought, but maybe Latin1?) to Windows file system (Latin1 I thought, but maybe ASCII).
    In other words, I am not sure what charcter set to come from or go to...  It turns out the code was already in the character set I had been trying to go to (which is why it wasn't working) and the set I seem to need to go to is not the one I thought...

  • Problems with French Characters in Page Title

    Here is the problem
    When using Duplicate Page and trying to set page titles with french characters (or other non standard characters for that matter such as qoutes) The resulting output does not display correctly.
    I thought a work around would be to us the HTML escape codes in the title dialog when creating the page  however it appears that Incontext then goes and attemps to escape the ampersand part of the escape code during save.
    so for instance when trying to set a page title such as Whistler Live! prépare la scène using the following escaped version
    Whistler Live! pr&eacute;pare la sc&egrave;ne
    The resulting HTML saved from incontext looks like this
    Whistler Live! pr&amp;eacute;pare la sc&amp;egrave;ne
    and the title does not display correctly.
    Incontext sees the & which is page of the HTML escape code and they automatically replaces that with &amp;
    How the heck can we set HTML Special characters in our page titles - any ideas?

    Hi Corey
    To answer your questions I am on windows 7 IE 8 and also tried in firefox 3.6
    backend is windows 2000 / IIS 6 / Coldfusion 8
    I am able to enter the characters in the dialog box but during the save they are altered
    I created a basic test page with nothing but the following code
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ice="http://ns.adobe.com/incontextediting">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>test</title>
    </head>
    <body>
    <div ice:editable="*" >
      <p>Test test</p>
    </div>
    </div>
    <script src="/includes/ice/ice.js" type="text/javascript"></script>
    </body>
    </html>
    saved it as test-characters.cfm (coldfusion page) and tested it out
    problem was still there however when I save the page as a .html file and test it out the problem is no longer present
    So the problem seems to only occur when using .cfm pages (even if there is no cf code on them)
    I am going to send you a private message with access to my test pages in case your inclined to take a look
    Thanks for you help so far

  • Insert french characters into the database

    Hi,
    My user requirement is to insert french characters into the db. However he has set as per my suggestion of altering session alter session set nls_language='french' he can't insert french characters. Is this using alter session helps to retrieve only the outputs in french language or to insert too?
    Please help.
    Version : oracle 8i
    nls_parameters at database level:
    SQL> select * from nls_database_parameters;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET US7ASCII
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_NCHAR_CHARACTERSET US7ASCII
    NLS_RDBMS_VERSION 8.1.7.0.0

    Your database character set is US7ASCII : you can only insert ASCII characters which is OK for most French characters but not all. This cannot work for:
    àéèùçChanging NLS_LANGUAGE won't help. You need to change database character set to WE8MSWIN1252 for example. This should be easy in your case because US7ASCII is a binary subset of many others characters set. Please read http://docs.oracle.com/cd/A87860_01/doc/server.817/a76966/ch3.htm#47136

  • Can my iMac be set to type with French characters?

    Hello all! Can my iMac be set to type with French characters? If so, what is the path? And, is there a keyboard overlay to see where the French language characters are located on the keyboard? Thanks!

    Hey Steve,
    Thanks again for the thoughts... Unfortunately, the only characters that I can use keyboard shortcuts for French are the é, ç and the á (it's better than nothing).
    Outside of that, I have to switch keyboard layouts. I know of the accent grave ( `e ) that's nextdoor to the number one key... But it don't work... my translator thinks it's a typo... because it takes up a whole characters worth of space instead of sharing the space with the actual letter (vowel), like the other accents.
    So I need keyboard shortcuts for:
    ê Ê Ë ë è È
    Ô ô Ö ö
    à À Û û
    I use these letters just enough to make switching keyboards back and forth a little irksome. Since the two keyboards have pretty distinctively different layouts and then we have the position of the A and M keys and.. well... see where this could lead??? LOL
    Thanks...
    I appreciate your thoughts, as always...
    Yvonne

  • DB view with flexible number of columns?

    In my Oracle 10 I have these tables
    Customer table:
    id      customer
    1       John
    2       Bob
    Item table
    id      item_name
    1       itemA
    2       itemB
    3       itemC
    4       itemD
    Purchase table:
    id      item_id date    customer_id
    1       3       070202  2
    2       6       070203  5
    ...I'd like to create a view like this:
            itemA   itemB   itemC   itemD   ...
    John    3       4       0       0       ...
    Bob     0       3       0       0       ...
    ...The view showed John purchased itemA 3 times, item B 4 times. Bob purchased itemB 3 times. This assume each customer only by one item at a time, which is a reasonable simplification of my situation.
    Such a view (with variable number of columns) is needed not in our web application but also provide an understandable data source for non IT professional to use report software. If my approach of solving this problem is completely wrong, I'd also like to know what's the common practice. Thank you very much in advance!
    Message was edited by:
    user609663

    I have tried to ask the question in a way that greatly simplify current problem to make it easy for others to understand without having to explain a lot of background information and 'the situation'; it seems I over-simplified the issue to make it even not worth solving or a wrong question being asked. So here I explain the complete problem and look for advice again (be prepared, pretty long description following:). I am a purchased customer of Oracle 10 DB and I reasonably expect being considered as Oracle user looking for help rather than students trying to play smart with assigned data normalization course exercises.
    We are working on a system that collects data from interview results. The questionnaires for the interviews are formatted with a coded question, followed by user's answer to the question, like the following:
         Question Code   Question content   Answer
         H001            ...                123
         H002            ...                45
         H003            ...                33
         H004            ...                66
         H005            ...                4,66
         ...             ...                ...The users answer question with a digit, for some special questions, e.g. H005, they are allowed to answer with a set of digits. There are thousands of interviews each year, the simplest solution to collect the interview answers is to use such a db table:
    simple_db_table:
    id   H001  H002  H003  H004  H005  H006  H007
    1    123   45    33    66    4     82    9
    ...This solution have two problems:
    1. It doesn't properly store answers to questions that requre a set of digits, like H005.
    2. The number of questions and their codes change from one survey to another, but the table have fixed number of columns and column names.
    And two benefit:
    1. With such simple table, people who use report software that directly access oracle db can creat their reports on easy-to-understand data presentation;
    2. calculation based on questionnaire data is simple, e.g. get the average of H007/H009 for questionnaires that have H002 > H003 * 600 would be:
    SELECT SUM(H007) / SUM(H009) FROM simple_db_table WHERE H002 > H003 * 600;Next solution we have normalized tables:
    questionnaire_entry_table:
    id                 NUMBER
    questionnaire_name CHARquestionnaire_definition_table:
    id                 NUMBER
    questionnaire_id   NUMBER
    question_code      CHAR
    question_content   VARHCARinterview_table:
    id                 NUMBER
    questionnaire_id   NUMBER
    date               DATEquestionnaire data table: itv_data
    id                 NUMBER
    interview_id       NUMBER
    question_code      CHAR
    answer             NUMBERWith the new structure, it just turn the problems of simple_db_table to its benefit and simple_db_table's benefit become the problem:
    1. Personnel who use report creation software feel too confused to make report based on such tables, because they do not understand the normalized modeling. In our case, effective training is difficult because there will be many geographically distributed people make reports based on this structure and they have lower IT knowledge than database administrators. These personnel can make reports based on simple_db_table.
    2. calculation based on questionnaire data is very difficult.
    To explain 2, let's take the same example, we still wish to get the average of H007/H009 for questionnaires that have H002 > H003 * 600, my method is:
    setp 1: create a view with by using:
           CREATE VIEW v (id, H002, H003) AS
           SELECT a.itv_id, a.H002, b.H003
             FROM itv_data a, itv_data b
           WHERE a.interviewee_id=b.interviewee_id
             AND a.question_code='H002' AND b.question_code='H003';step 2: create a stored procedure to get the calculation result:
           CREATE OR REPLACE PROCEDURE get_result (result OUT NUMBER) IS
             sh007 NUMBER := 0;
             sh009 NUMBER := 0;
           BEGIN
             SELECT SUM(H007) INTO sh007 FROM itv_data
               WHERE itv_id in (SELECT id FROM v WHERE H002 > H003 * 683);
             SELECT SUM(H009) INTO sh009 FROM itv_data
               WHERE itv_id in (SELECT id FROM v WHERE H002 > H003 * 683);
             idc := sh007/sh009;
           END get_idc;As you can see the calculation become much more complex and might involve overhead.
    There might be better way to calculate the result that I don't know yet. We have some 100 different formulas to calculate different results, so it's important to get them right and efficiently.
    The best solution seems to me is that to create such a view from itv_data and other tables so that to reflect the same structure of simple_db_table. So here comes the question I originally asked how is it possible to create a view with flexible number of columns. I made the very simple example in my original posted message wishing to get an idea of this is possible or the way to go.
    I may be taking a completely wrong approach to attack the problem, e.g. perhaps there is a simpler way to get_result from itv_table and for report creation users I should use a metadata layer on top of the normalized table structure (e.g. by using Metadata Query Language from Pentaho BI). But anyway I'd like to get some insightful ideas from the forum. Again thanks for help in advance.

  • French Characters in File Names

    Hello,
    Despite my instance not use French and/or other special
    characters in files names, we have inherited a project (approx 2500
    topics) with French characters in the file name. When we generated
    the project and post it on an Apache server, the topics do not
    display as the server replaces the characters with symbols.
    RX5, during the generation process, replaced the French
    characters with underscores, RX 7.0.1 keeps the characters within
    the file name. In RX 7.0.1 is it possible to replace the characters
    with underscores during the generation process?
    Regards,

    If this is the other thread, then you did get a response, several in fact. It may not have been the answer you wanted but that's another matter.
    http://forums.adobe.com/message/129875#129875
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Sorting of contacts with foreign characters in the name

    Hello,
    I have a large address book, some with Japanese characters in their name.
    I'm on English Language setting for the OS on my iphone and ipad.
    All the contacts with Japanese characters in their name seem to get pushed to the # section of the alphabet rather than at the equivalent roman alphabet letter.
    Also note that adding the Japanese name in the secondary fields of "phonetic first" and "phonetic second" of an existing Roman English based contact sends this to the # section.
    This is poor sorting of contacts. 
    Very poor....

    After posting this I found a solution.  I hadn't tried it this way round.
    https://discussions.apple.com/message/7589528#7589528
    Go into one of your Japanese contacts and click edit.
    Go right to the bottom of the edit page and add field, add phonetic first name, then repeat the step to add phonetic last name.
    Now edit the name of your contact, keep their name in Japanese and enter the phonetic spelling in English.
    Smashin....  :-)

  • Problem with French characters with updateContent

    I have this problem with Spry, (had it also with YUI a few
    months ago) with special french characters
    (éèçàù). I use encoding UTF-8, but
    iso-8859-1 isn't working either. I put some examples here:
    http://www.eventsonholiday.com/test_loadurl.asp
    As long as it is static content, no problem. But when I get
    content from a recordset from an Access database: trouble.
    In IE7 the french characters are even worse, and I get the
    error: null is empty or not an object

    I think I found a solution. I found a few resources on the
    internet that said: xmlhttprequest always sends data as utf-8 by
    default. So when all the other pages use iso-8859-1, there's a
    problem. It can be solved this way: when retrieving recordset
    fields from ASP I use
    HTMLEncoding like this:
    <%=Server.HTMLEncode(RSevents.Fields.Item("event_location").Value)%>.
    I have to do this for each field in the page, what means some extra
    work.
    For PHP it should be done with
    htmlentities
    If anyone has a solution without using the Server.HTMLEncode
    method, tell me...

  • How to use a select statement with chinese characters?

    I am currently developing a java servlet<using tomcat 4.x> which allows me to use select statement to retrieve results from the Microsoft SQL Server 2000 database. I am using a simple form to get the parameter for querying. The main problem i'm facing is that there are chinese information in the SQL database, but i can't retrieve it through the sql statement with the chinese characters input<thru the form with the help of NJ STAR>in the WHERE condition. When i execute the statement, it returns me no results even though the rows are present in the database.
    Does anyone have the solution to using chinese words in the WHERE clause of the select statement to retrieve results with columns which contains chinese characters? Please help me. Thanks everyone. :)
    PS: when i cut and paste those characters in the sql database and paste onto java.. it is ??? in questionmarks.. but when i paste them into excel 2000.. its shown as chinese chars again..
    please heelppp~~

    Greetings,
    PS: when i cut and paste those characters in thesql
    database and paste onto java.. it is ??? in
    questionmarks.. but when i paste them into excelThis is why the SELECT is not returning any results.
    You need to set the character encoding set on your
    statement and parameters for the characters to be
    properly translated. Refer to the charsetName
    parameter in the String class constructor in your API
    docs and also to
    $JDK_DOCS/guide/intl/encoding.doc.html in your JDK
    documentation.
    2000.. its shown as chinese chars again..Because Office programs are performing the same kind
    of character translation with the appropriate MS APIs.
    please heelppp~~Regards,
    Tony "Vee Schade" Cookis it possible for you to show me some coding examples? i don't really understand what is to be done in order to set the char set and what does it really do.. tried reading up but still dun understand.. :(
    pardon my shallow knowledge of java..
    ok..
    The thing is when i used an insert statement with chinese characters of GBK format hardcoded into the java servlet and then i use the insert statement to insert the chars into the database, it cannot be seen as a chinese word when i off the NJStar. and then it can be searched out with my current form of servlet.. below is my coding of the servlet..
    note: i've set my html file to charset = GBK
    //prototype of Search engine...
    //workable for GBK input and output...
    import java.io.*;
    import java.io.OutputStream;
    import java.io.IOException;
    import javax.servlet.http.*;
    import javax.servlet.ServletException;
    import java.util.*;
    import java.sql.*;
    import java.nio.charset.Charset;
    public class SearchBeta extends HttpServlet {
         private Vector musicDetails = new Vector();
         private String query = "";
         public void service (HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException, UnsupportedEncodingException {
              query = req.getParameter ("T1");
              System.out.println("before:"+query);
              String type = req.getParameter ("D1");//type
              query = req.getParameter ("T1");
              //query = "������";
              System.out.println("after:"+query);
              getResults(type,query);
              System.out.println("locale = :"+req.getLocale());
              res.setContentType ("text/html;charset=GBK");
              PrintWriter out = res.getWriter();
              out.println("<html>");
              out.println("<head>");
              out.println("<body bgcolor = \"black\">");
              out.println("<font face = \"comic sans ms\" color=\"Cornsilk\">");
              if (query.length()==0)
                   out.println ("Please key in your search query.");
              else if (musicDetails.size()==0)
                   out.println ("Sorry, no results matching your search can be found.");
              else {
                   out.println("<center>");
                   out.println("<table cellspacing = \"50\">");
                   int i = 0;
                   //Display the details of the music
                   while (i<musicDetails.size()) {
                        Results details = (Results)musicDetails.get(i);
                        String dbArtist = "";
                        String dbAlbum = "";
                        String dbTitle = "";
                        String dbCompany = "";
                        dbAlbum = details.getAlbum();
                        dbTitle = details.getTitle();
                        dbCompany = details.getCompany();
                        dbArtist = details.getArtist();
                        try{
                             dbAlbum = new String(dbAlbum.getBytes("ISO-8859-1"),"GBK");
                             dbTitle = new String(dbTitle.getBytes("ISO-8859-1"),"GBK");
                             dbCompany = new String(dbCompany.getBytes("ISO-8859-1"),"GBK");
                             dbArtist = new String(dbArtist.getBytes("ISO-8859-1"),"GBK");//correct translation.
                        catch(UnsupportedEncodingException e){
                             System.out.print(e);
                             e.printStackTrace();
                        String dbImage_loc = details.getImage();
                        out.println("<tr>");
                             out.println("<td><table>");
                                  out.println("<img src=C:\\Program Files\\Apache Group\\Tomcat 4.1\\webapps\\examples\\ThumbNails\\"+dbImage_loc+">");
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Artist: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbArtist+"</font></td>");
                             out.println("</tr>");
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Title: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbTitle+"</font></td>");
                             out.println("</tr>");
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Company: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbCompany+"</font></td>");
                             out.println("</tr>");
                             System.out.println("album: "+ dbAlbum);
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Album: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbAlbum+"</font></td>");
                             out.println("</tr>");
                             System.out.println("company: "+ dbCompany);
                             out.println("</table></td>");
                        out.println("</tr>");
                        i++;
                   out.println("</table>");
                   out.println("</center>");
              out.println("</font>");
              out.println("</body>");
              out.println("</head>");
              out.println("</html>");
              out.close();
              //to remove all the elements from the Vector
              musicDetails.removeAllElements();
         //get Searched Music Details and store in Results object which is stored in musicDetails vector
         public void getResults (String type, String searchQuery) {
              try {
                   Class.forName ("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=music","sa","kokkeng");
                   Statement stmt = con.createStatement();
                   String query = "SELECT * FROM MusicDetails WHERE "+type+" = '"+searchQuery+"'";
                   ResultSet rs = stmt.executeQuery(query);
                   while (rs.next()) {
                        String artist = rs.getString("Artist");
                        String title = rs.getString("Song");
                        String company = rs.getString("Company");
                        String album = rs.getString("Album");
                        String image_loc = rs.getString("Image");
                        Results details = new Results (artist,title,company,album,image_loc);
                        musicDetails.add(details);
                   stmt.close();
                   con.close();
              catch (Exception e) {
                   System.out.println(e.getMessage());
                   e.printStackTrace();
    with the above servlet i created, i can search out the data in the database which i've inserted through the insert statement. I still can't search for things i've keyed into the database directly using NJStar..
    thank you so much for helping.. really hope any one else who knows the answer to this will reply too... thank you all so much...
    -KK

  • Problem in select querry with select option

    Hi all,
    How have a problem with the select querry, Pls correct my querry
    select opbel gpart betrw fdgrp into table lt_balance from dfkkop
                      where fdgrp in s_augrp
                        and hvorg = '5000'
                        and tvorg = '0100'.
    Thanx in advance,
    Line

    Hi
    I have tried this select querry, but I am unable to fetch the data in the internal table
    select opbel gpart betrw fdgrp into correspondiing fields of table it_balance
    from dfkkop
    where fdgrp in s_augrp
    and hvorg = '5000'
    and tvorg = '0100'.
    Can you please tell me what is wrong in this querry,
    Line

  • Parse exception with french characters

    My parsing program throws a SaxParseException upon the parse of some french characters; in particular a "�" character. These characters are enclosed in a CDATA tag, so I'm not sure why its being parsed. My file is encoded in UTF-8. How can resolve this problem? Thanks
    org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.
         at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
         at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
         at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:172)

    Your file is not encoded in UTF-8, although the XML
    prolog claims it is.Meaning the sender/creator of the file is at fault?
    If not UTF-8, then probably ISO-8859-1, correct?Most likely the creator of the file is at fault. But it's possible that it has been through some transformation between them and you that rewrote it in a new charset.
    Sure, the real encoding could be ISO-8859-1. Or it could be windows-1252. Other encodings are possible but unlikely, I suppose.

  • Inserting special french characters into UTF8 database

    Hello ,
    we have a database of release 10.2.0.5.0 with the following NLS settings:
    PARAMETER
    VALUE
    NLS_CALENDAR
    GREGORIAN
    NLS_CHARACTERSET
    UTF8
    NLS_COMP
    BINARY
    NLS_CURRENCY

    NLS_DATE_FORMAT
    DD.MM.RR
    NLS_DATE_LANGUAGE
    GERMAN
    NLS_DUAL_CURRENCY

    NLS_ISO_CURRENCY
    GERMANY
    NLS_LANGUAGE
    GERMAN
    NLS_LENGTH_SEMANTICS
    BYTE
    NLS_NCHAR_CHARACTERSET
    AL16UTF16
    NLS_NCHAR_CONV_EXCP
    FALSE
    NLS_NUMERIC_CHARACTERS
    NLS_SORT
    GERMAN
    NLS_TERRITORY
    GERMANY
    NLS_TIME_FORMAT
    HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMA
    DD.MM.RR HH24:MI:SSXFF
    NLS_TIMESTAMP_TZ_FORMAT
    DD.MM.RR HH24:MI:SSXFF TZR
    NLS_TIME_TZ_FORMAT
    HH24:MI:SSXFF TZR
    When executing a script including special french characters with SQL*Plus (or with a job of Cloud Control) the result in the database shows up wrong:
    e.g. FR R�au instead of  FR Réseau
    When checking the HEX-code of the special french characters in the script these are correct:
    é => E9
    Setting the environment variable NLS_LANG to FRENCH_FRANCE.UTF8 before executing the script does not make any difference at all.
    When checking the sign � in the string FR R�au with the dump function of SQL*Plus I get this result:
    Typ=1 Len=3 CharacterSet=UTF8: e9,73,65
    Seems to be OK - but why does it get displayed wrong? Is the client - in our case a application - responsible for the "how to display"?
    Any help will be appreciated!
    Rgds
    Jan

    Hi,
    If you have My Oracle support access I suggest to check one of following two documents:
    Oracle Metalink: The correct NLS_LANG in a Windows Environment Doc ID: 179133.1 
    Oracle Metalink: The correct NLS_LANG setting in Unix Environments Doc ID: 264157.1
    depending your env.
    Check your data using SQL Developer and see if it displays well. If yes your data is ok in db.

  • Problem to get file with special characters in the message

    Hi, I'm developing an application that read the email and save the attached file. However, some files have special characters in the name, like: Documento de EspecificaÇÂO.doc
    I noticed the de name of the file in de message head is:
    "=?iso-8859-1?Q?Documento_de_Especifica=E7=E3o.doc?="
    I'm already using the JavaMil 1.4.5
    Tha is my code:
    package br.com.cesan.helpdesk;
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Properties;
    import javax.mail.Flags;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Part;
    import javax.mail.Session;
    import javax.mail.Store;
    import javax.mail.search.FlagTerm;
    public class LerEmail2 {
         * @param args
         * @throws MessagingException
         * @throws IOException
         public static void main(String[] args) throws MessagingException, IOException {
              // TODO Auto-generated method stub
              // Get session
         Session session = Session.getInstance(new Properties(), null);
         // Get the store
         Store store = session.getStore("pop3");
         store.connect("pop.xxxxx.com.br", "user", "password");
         Folder folder = store.getFolder("INBOX");
              //folder.open(Folder.READ_ONLY);
              folder.open(Folder.READ_WRITE);
              // Show only unreaded Messages
              FlagTerm ft = new FlagTerm(new Flags(Flags.Flag.SEEN), false);
              // Get directory
         Message message[] = folder.getMessages();     
         //Message messages[] = folder.search(ft);
         for (int i=0, n=message.length; i<n; i++) {
              System.out.println(i + " - "+ message.getSubject() +" - " + message[i].getSentDate() );
              Object content = message[i].getContent();
              if (content instanceof Multipart) {
         handleMultipart((Multipart)content);
         } else {
         handlePart(message[i]);
         // Close connection
         folder.close(false);
         store.close();
         public static void handleMultipart(Multipart multipart) throws MessagingException, IOException {
              for (int i=0, n=multipart.getCount(); i<n; i++) {
                   handlePart(multipart.getBodyPart(i));
         public static void handlePart(Part part) throws MessagingException, IOException {
              String disposition = part.getDisposition();
         String contentType = part.getContentType();
         if (disposition == null) { // When just body
              System.out.println("Null: " + contentType);
              // Check if plain
              if ((contentType.length() >= 10) && (contentType.toLowerCase().substring(0, 10).equals("text/plain"))) {
                   part.writeTo(System.out);
              } else { // Don't think this will happen
                   System.out.println("Other body: " + contentType);
                   part.writeTo(System.out);
         } else if (disposition.equalsIgnoreCase(Part.ATTACHMENT)) {
              System.out.println("Attachment: " + part.getFileName() + " : " + contentType);
              saveFile(part.getFileName(), part.getInputStream());
         } else if (disposition.equalsIgnoreCase(Part.INLINE)) {
         System.out.println("Inline: " +
         part.getFileName() +
         " : " + contentType);
         saveFile(part.getFileName(), part.getInputStream());
         } else {  // Should never happen
         System.out.println("Other: " + disposition);
         public static void saveFile(String filename, InputStream input) throws IOException {
              if (filename == null) {
                   filename = File.createTempFile("xx", ".out").getName();
              // Do no overwrite existing file
              File file = new File(filename);
              for (int i=0; file.exists(); i++) {
                   file = new File(filename+i);
              System.setProperty("file.encoding", "iso-8859-1");
              FileOutputStream fos = new FileOutputStream(file);
              BufferedOutputStream bos = new BufferedOutputStream(fos);
              BufferedInputStream bis = new BufferedInputStream(input);
              int aByte;
              while ((aByte = bis.read()) != -1) {
                   bos.write(aByte);
              bos.flush();
              bos.close();
              bis.close();
    The problem occurs in:
    FileOutputStream fos = new FileOutputStream(file);
    BufferedOutputStream bos = new BufferedOutputStream(fos);
    BufferedInputStream bis = new BufferedInputStream(input);
    int aByte;
    while ((aByte = bis.read()) != -1) {
    bos.write(aByte);
    Thanks
    Edited by: user10283976 on 30/03/2012 07:36
    Edited by: user10283976 on 30/03/2012 07:37
    Edited by: user10283976 on 30/03/2012 07:37
    Edited by: user10283976 on 30/03/2012 07:38
    Edited by: user10283976 on 30/03/2012 07:40
    Edited by: user10283976 on 30/03/2012 07:41
    Edited by: user10283976 on 30/03/2012 07:42

    http://www.oracle.com/technetwork/java/javamail/faq/index.html#encodefilename

  • Renaming files with invalid characters in their names on NTFS partitions, introduced by operating systems other than Windows

    Essentially, Linux created some files with colons (:) in the name on a NTFS partition where I have Windows installed. I have since uninstalled Linux, but now I can only view these files in Windows Explorer. I can't open them, I can't even rename them to
    correct the problem. It's as if they don't exist, because of the invalid search paths.
    If I try to rename them in Windows Explorer I get following message.
    The file name you specified is no valid or too long.
    Specify a different file name.
    Well isnt' that something?... isn't that nice? Windows is able to display these files, but it doesn't allow me to open them and it certainly doesn't like me to rename them. So why is it whining about it then, when I'm trying to help? It says "try a different
    file name". Yeah, right! Like I haven't tried that one already! It doesn't matter what file name I input it will never accept it.
    So what am I supposed to do now? Ditch Windows and go back to Linux? Surely, Microsoft doesn't like the sound of that. Sure, I could reinstall Linux or run a Linux live system to correct the problem. But what good is Windows then? I might as well switch to
    Linux altogether.
    After doing some research I now know by fact that it's (kind of) possible to rename files from UNIX and UNIX-like operating systems to those compliant with Windows by using something called file name character translation. To some level this is essential and
    necessary for Windows interoperability with other operating systems (Windows is not the only operating system in the world). But this seems to be very complicated and I can't get my head around it. My brain is in overload. I don't know where to start.
    Once there was a...
    There's the Windows Services for UNIX (SFU) 1.0, 2.0, 3.0, 3.5. The first two versions were based on MKS Toolkit, a package licensed by Microsoft from MKS Inc. The later versions were based on the similar Interix product, after Microsoft purchased the company
    that made it.
    Then there's the new Subsystem for UNIX-based Applications (SUA). These are services for UNIX components. They are supposed to have Client for NFS v3 included as well. But the server components from the SFU line is missing (e.g. Server for NFS). These are included
    in Server editions of Windows.
    Then there's the Microsoft Knowledge Base article
    289627: "How to Enable File Name Character Translation". This article seems to describe exactly my situation.
    Windows and UNIX operating systems have restrictions on valid characters that can be used in a file name. The list of illegal characters for each operating system, however, is different. For example, a UNIX file name can use a colon (:), but a Windows
    file name cannot use a colon (:). If a UNIX user attempts to create a file with a Windows illegal character on a Windows Services for UNIX network file system (NFS) share, the attempt is unsuccessful and the UNIX client computer receives an input or output
    error.
    It goes further than that. At first glance, this KB article also seems to offer a solution to this exact problem, with examples as shown below.
    For example, the following maps the UNIX colon (:) to a Windows dash (-):
    0x3a : 0x2d ; replace client : with - on server
    I checked these values in charmap.exe and they are correct. Except for 2D not being a "dash", it's rather a hyphen ("hyphen minus" to be exact), but these two have pretty much the same appearance and they get interchanged a lot, I'm sure
    they are used to it by now. (Yes, the characters! They don't mind.)
    Then there's this registry key.
    HKEY_LOCAL_MACHINE\Software\Microsoft\Server For NFS\CurrentVersion\Mapping
    Well, of course, I don't have Server for NFS. So this is a dead end. Well, actually, it was a dead end from the beginning...
    1. First of all, I'm not working with a network share on a NAS or SAN storage. The files are on the local disk drive where Windows is installed, so that's a DAS for you.
    2. I don't have SFU! Well obviously, I'm on Windows Vista! So that means SUA!
    3. SUA are service components only. No server components. Can you guess what that means? Yeah... no "Server for NFS" since it's a server component.
    4. Windows Vista is a client side operating system! Server for NFS is only offered for use with Windows Server systems.
    5. Back to square one!
    So there you have it. They all lived happy for the rest of their lives...
    I'm stuck here. Can someone tell me what to do? I mean beyond the obvious option to use Linux to fixa a Windows problem? The NTFS file system itself supports colons in file names. It's Windows that doesn't, and so by default it proclaims it invalid character.
    Surely, even a Windows client operating system like Windows Vista should be able to allow the user to at least rename files with invalid characters to something more sensible (from the system point of view) and valid, if not being able to open them as they
    are. Just add some crazy voodoo code to it and it will work. If you can make it possible on Windows Server with UNIX user-mode subsystem on NT kernel, then what's stopping you from giving the Windows client system the same benefit?
    So what now? Purchase a Windows Server 2012 R2 license, copy my invalid files to a NAS share with NFS on a UNIX or Linux system, and have a go at the Windows registry and Server for NFS? Yeah... you're right, it's probably a bit over the top...
    On a second thought... I might as well install Linux again. There are countless situations where Linux has helped me solve problems related to, and more often than not caused by Windows.

    Essentially, Linux created some files with colons (:) in the name on a NTFS partition where I have Windows installed. I have since uninstalled Linux, but now I can only view these files in Windows Explorer. I can't open them, I can't even rename them to
    correct the problem. It's as if they don't exist, because of the invalid search paths.
    If I try to rename them in Windows Explorer I get following message.
    The file name you specified is no valid or too long.
    Specify a different file name.
    Well isnt' that something?... isn't that nice? Windows is able to display these files, but it doesn't allow me to open them and it certainly doesn't like me to rename them. So why is it whining about it then, when I'm trying to help? It says "try a different
    file name". Yeah, right! Like I haven't tried that one already! It doesn't matter what file name I input it will never accept it.
    So what am I supposed to do now? Ditch Windows and go back to Linux? Surely, Microsoft doesn't like the sound of that. Sure, I could reinstall Linux or run a Linux live system to correct the problem. But what good is Windows then? I might as well switch to
    Linux altogether.
    After doing some research I now know by fact that it's (kind of) possible to rename files from UNIX and UNIX-like operating systems to those compliant with Windows by using something called file name character translation. To some level this is essential and
    necessary for Windows interoperability with other operating systems (Windows is not the only operating system in the world). But this seems to be very complicated and I can't get my head around it. My brain is in overload. I don't know where to start.
    Once there was a...
    There's the Windows Services for UNIX (SFU) 1.0, 2.0, 3.0, 3.5. The first two versions were based on MKS Toolkit, a package licensed by Microsoft from MKS Inc. The later versions were based on the similar Interix product, after Microsoft purchased the company
    that made it.
    Then there's the new Subsystem for UNIX-based Applications (SUA). These are services for UNIX components. They are supposed to have Client for NFS v3 included as well. But the server components from the SFU line is missing (e.g. Server for NFS). These are included
    in Server editions of Windows.
    Then there's the Microsoft Knowledge Base article
    289627: "How to Enable File Name Character Translation". This article seems to describe exactly my situation.
    Windows and UNIX operating systems have restrictions on valid characters that can be used in a file name. The list of illegal characters for each operating system, however, is different. For example, a UNIX file name can use a colon (:), but a Windows
    file name cannot use a colon (:). If a UNIX user attempts to create a file with a Windows illegal character on a Windows Services for UNIX network file system (NFS) share, the attempt is unsuccessful and the UNIX client computer receives an input or output
    error.
    It goes further than that. At first glance, this KB article also seems to offer a solution to this exact problem, with examples as shown below.
    For example, the following maps the UNIX colon (:) to a Windows dash (-):
    0x3a : 0x2d ; replace client : with - on server
    I checked these values in charmap.exe and they are correct. Except for 2D not being a "dash", it's rather a hyphen ("hyphen minus" to be exact), but these two have pretty much the same appearance and they get interchanged a lot, I'm sure
    they are used to it by now. (Yes, the characters! They don't mind.)
    Then there's this registry key.
    HKEY_LOCAL_MACHINE\Software\Microsoft\Server For NFS\CurrentVersion\Mapping
    Well, of course, I don't have Server for NFS. So this is a dead end. Well, actually, it was a dead end from the beginning...
    1. First of all, I'm not working with a network share on a NAS or SAN storage. The files are on the local disk drive where Windows is installed, so that's a DAS for you.
    2. I don't have SFU! Well obviously, I'm on Windows Vista! So that means SUA!
    3. SUA are service components only. No server components. Can you guess what that means? Yeah... no "Server for NFS" since it's a server component.
    4. Windows Vista is a client side operating system! Server for NFS is only offered for use with Windows Server systems.
    5. Back to square one!
    So there you have it. They all lived happy for the rest of their lives...
    I'm stuck here. Can someone tell me what to do? I mean beyond the obvious option to use Linux to fixa a Windows problem? The NTFS file system itself supports colons in file names. It's Windows that doesn't, and so by default it proclaims it invalid character.
    Surely, even a Windows client operating system like Windows Vista should be able to allow the user to at least rename files with invalid characters to something more sensible (from the system point of view) and valid, if not being able to open them as they
    are. Just add some crazy voodoo code to it and it will work. If you can make it possible on Windows Server with UNIX user-mode subsystem on NT kernel, then what's stopping you from giving the Windows client system the same benefit?
    So what now? Purchase a Windows Server 2012 R2 license, copy my invalid files to a NAS share with NFS on a UNIX or Linux system, and have a go at the Windows registry and Server for NFS? Yeah... you're right, it's probably a bit over the top...
    On a second thought... I might as well install Linux again. There are countless situations where Linux has helped me solve problems related to, and more often than not caused by Windows.

Maybe you are looking for