Why am I unable to display characters from 128 to 255 on my Macintosh?

1 view (last 30 days)
Why do I see blank placeholder characters when I print characters between 128 to 255 using the MATLAB functions CHAR or SPRINTF on a Macintosh ?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The display of characters on the screen is largely dependent on the default character set of the X windows manager. In this case, the character set is probably US ASCII which is essentially a 7 bit character set and hence is unable to display characters beyond 128.
You can change your default character set to an 8 bit character set to eliminate this problem. To find the current character set, check the setting of the LANG environment variable. This can be done using the following command:
echo $LANG
The setting of LANG may be changed to any 8 bit character set such as 'en_US' to activate the display of characters from 128 to 255. The following command may be used to set LANG to en_US:
setenv LANG en_US

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!