How to Store emojis when used as an input to text field in App Designer.

조회 수: 8 (최근 30일)
Xymbu
Xymbu 2022년 5월 3일
편집: Rik 2022년 5월 4일
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
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
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개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by