Thank you very much for the useful tips. Ok, when I select the file name
ABC_ä.png
result in Firefox on a Mac:
selected file name: ABC_ä.png
charcode at 0 = 65 is char A
charcode at 1 = 66 is char B
charcode at 2 = 67 is char C
charcode at 3 = 95 is char _
charcode at 4 = 228 is char ä
charcode at 5 = 46 is char .
charcode at 6 = 112 is char p
charcode at 7 = 110 is char n
charcode at 8 = 103 is char g
result in Chrome on Mac:
selected file name: ABC_ä.png
charcode at 0 = 65 is char A
charcode at 1 = 66 is char B
charcode at 2 = 67 is char C
charcode at 3 = 95 is char _
charcode at 4 = 97 is char a
charcode at 5 = 776 is char ̈
charcode at 6 = 46 is char .
charcode at 7 = 112 is char p
charcode at 8 = 110 is char n
charcode at 9 = 103 is char g
So the ä is in Firefox 228 (which is actually the correct code), but the ä is
in Chrome on a Mac 97 (code for the character a) and 776 (code for the 2 dots
over the a).
This issue occurs even when I don’t embed any font in my app.
So how can I solve this? Can I even solve this myself? Maybe it’s a Pepper
Player issue.
Here is my test-code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
private var _refAddFiles:FileReferenceList;
private function uploadTest():void
{
_refAddFiles = new FileReferenceList();
_refAddFiles.addEventListener(Event.SELECT,
onSelectFileRef);
_refAddFiles.browse();
}
private function onSelectFileRef(event:Event):void
{
for each(var uploadFile:Object in
_refAddFiles.fileList)
{
var dateiName:String = uploadFile.name;
trace("selected file name: " +
dateiName);
var traceAlert:String = "selected file
name: " + dateiName + "\n\n";
for(var i:int = 0; i <
dateiName.length; i++)
{
var traceStr:String = "charcode
at " + i + " = " + dateiName.charCodeAt(i) + " is char " +
String.fromCharCode(dateiName.charCodeAt(i));
traceAlert += "\n" + traceStr;
trace(traceStr);
}
Alert.show(traceAlert);
}
}
]]>
</fx:Script>
<s:Button label="upload test" click="{uploadTest()}"/>
</s:Application>
> Am 02.11.2015 um 17:52 schrieb Alex Harui <[email protected]>:
>
> Try dumping the charCode for each character in the file name. I wonder if
> you having some sort of double-byte or code page issue.
>
> -Alex
>
> On 11/2/15, 8:35 AM, "Marcus Fritze" <[email protected]> wrote:
>
>> Mhm, the font is Verdana. So nothing special.
>>
>> But, when I set the fileRef.name to a TextField the file-name Test_ä.pdf
>> is shown as Test_a.pdf
>>
>> And when I move the cursor after the „a" in the TextField and press
>> backspace, the invisible
>> character will be deleted, when I press backspace again, the „a“ will be
>> deleted.
>>
>> But is my embedded font used when I save the file-name internally and
>> upload the file-name to the server?
>>
>> Maybe, I should test on a older OS X (and not the latest version).
>>
>>> Am 02.11.2015 um 17:21 schrieb Tom Chiverton <[email protected]>:
>>>
>>> On 02/11/15 16:16, Marcus Fritze wrote:
>>>> (where I use embedded font, it works)
>>>
>>> Maybe the font doesn't have the correct glyphs.
>>>
>>> Tom
>>
>
signature.asc
Description: Message signed with OpenPGP using GPGMail
