How to Store emojis when used as an input to text field in App Designer.
7 次查看(过去 30 天)
显示 更早的评论
I have a matlab app that im working on and in the text input that involves emojis which are then currently written to a csv. the problem is the csv doesnt support emojis. is there a better way to do this?
1 个评论
Geoff Hayes
2022-5-4
@Xymbu - please describe how the text input represents the emojis. Are you expecting the csv file - which is a text file - to somehow show the emoji icon/graphic? Please clarify.
采纳的回答
Rik
2022-5-4
编辑:Rik
2022-5-4
Encoding is very important here. CSV files are simply plain text files. That means you need to make sure the encoding allows unicode values outside of the BMP (since most emoji have a code point outside of that range).
If you control both the writing and the reading, you could consider writing the unicode value HTML style: &# 160; (for the non breaking space, which has code point 160).
Note that Matlab encodes char with UTF-16, so most emoji will consist of two elements. You should also note that some reading functions (I check for the readlines function) will fail to read emoji, replacing them with char(26).
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!