A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Text Problems: csv shows no ä,ü,ö...

  1. #1
    Senior Member
    Join Date
    Mar 2006
    Posts
    191

    Text Problems: csv shows no ä,ü,ö...

    I hope Wilbert will read this....
    I have imported csv Data. These data contain German special characters like
    ö, ä, ß, ü...
    But the textbox shows W�rme instead of Wärme.
    The Text in the csv File is ok!

    Thanks all

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    By default the flash player treats external text as unicode so there's two options.
    1. use System.useCodepage = true; to use the traditional code page.
    2. make sure the csv file is saved as Unicode / UTF-8.
    Last edited by w.brants; 04-13-2006 at 07:32 AM.

  3. #3
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    Dear Wilbert,

    I am still working with the csv File.
    I tried this Code in EditFrameAction at the beginning (the same...)
    and before loading the csv File... (the same)

    System.codepage = true
    lv.load('myData.csv');

    I tested the csv file! All Data in my csv File are ok with ö, ä, ü...
    I examined the exort:
    When I export the data I have the possibility to choose Windows ansi
    and DOS OS/2 this Data are Windows ansi

    and...There is still a little problem with the Picture in my csv..
    _root.contentpane1.setContent(4,v[9],0,0.5);// the picture path in my csv...
    The [9] means it is the Field Nr. 9 with the Picture path C:\Picture.jpg?
    Your example works fine! But If I try to define Nr 9 the picture can't be indicated
    Where....is my fault???

  4. #4
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Quote Originally Posted by Uwe S.
    System.codepage = true
    My mistake. I typed it wrong (see my post above for the right edited syntax).

    Quote Originally Posted by Uwe S.
    The [9] means it is the Field Nr. 9 with the Picture path C:\Picture.jpg?
    Since array's are zero based v[9] would be the 10th field. If you want to make sure use datatype 0 instead of 4 (the first variable for the setContent function) as I mentioned before to see the actual content of the variable as text. Check if that's the filename and if it exists. If your project should work on a remote server, you would have to alter the filename string because the C drive most likely won't exist on a remote server.

  5. #5
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    that's it! I works...
    wow...I tried and tried, but that the Field No. 9 is the 10th Field...!!!
    that cost me a lot of time...

    and...System.useCodepage = true works fine too

    I noticed, that if there is no picture path in my csv-File the picture doesn't change to nothing (contentpane1 should be empty..but it shows the picture before)
    until I choose an entry with an other picture! Do I have to edit all empty paths in my csv?
    If there is no picture in my csv the path-Text is (no picture)

  6. #6
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Quote Originally Posted by Uwe S.
    Do I have to edit all empty paths in my csv?
    No, you can use an if construction to check if it is empty.
    Code:
    if (v[9].length > 0){
     _root.contentpane1.setContent(4,v[9],0,0.5);
    } else {
     _root.contentpane1.setContent(5,'KC8_Object',0,0.5);
    }

  7. #7
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    Thanks Wilbert,
    you are great! Where can people learn this?
    Are there Books how to write like you? I mean
    to understand what really happens ([}...

  8. #8
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Quote Originally Posted by Uwe S.
    Where can people learn this?
    Are there Books how to write like you? I mean
    to understand what really happens ([}...
    The last solution was just because I know the components code well.

    In general everyone has their own way of learning things and their own style of coding. My style of coding isn't much superior or worse compared to others, it's just my style of coding.

    Personally I never used an actionscript book. The online MacroMedia actionscript reference works for me but I'm sure other KM users can give you suggestions when it comes to books.

  9. #9
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    Wilbert, I would like to thank you again cordially for your assistance and patience with me! You helped me a lot...!

    bye Uwe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center