开发者

Adobe Flex unicodeRange

I have a flex application, where the font style has been set as follows:

@font-face {
  fontFamily: Arial;
  fontWeight: n开发者_StackOverflowormal;
  fontStyle: normal;
  src: local("Arial");
  unicodeRange: U+0021-U+007E, 
  U+a3-U+a3;
}

The unicode range of U+a3 allows users to enter the £ (British Pound sign).

When entering this data in flex and saving to the database, the £ sign gets prepended with some weird characters like "Âã". I debugged the flex app, and stopped code on the save action, and the offending control indeed shows the weird characters in the save variable. So, the error seems to be created on the flex side.

I then changed the font as follows, removing any unicode references

@font-face {
  fontFamily: Arial;
  fontWeight: normal;
  fontStyle: normal;
  src: local("Arial");
}

This seems to improve it somewhat, but the data is now saved as "£". Stepping through the code shows that the character is only being sent through to the server as a £, so it would seems that the error is now created on the database side

I'm probably missing something obvious here. Ideally I'd like to keep the unicode range as small as possible.


Having stumbled upon a similar question at MySQL or PHP is appending a  whenever the £ is used, I realised that its completely correct that the DB is saving the item as £.

Importantly, however, the unicodeRange must be U+00A3-U+00A3 and not U+a3-U+a3

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜