fwrite( ) displays a character incorrectly

5 views (last 30 days)
usr5
usr5 on 27 Jul 2017
Edited: Robert U on 27 Jul 2017
The character in question is ” (right double quote mark, HTML code 8221). fwrite() output is shown below:
>>fwrite(1, ' hello ” ') hello ÿ
I am using R2016b.

Answers (1)

Robert U
Robert U on 27 Jul 2017
Edited: Robert U on 27 Jul 2017
Hi usr5,
the issue addressed is the precision parameter (https://de.mathworks.com/help/matlab/ref/fwrite.html).
fwrite(1, ' hello ” ','char')
That can give you the correct output.
Kind regards,
Robert Uhlig

Categories

Find more on Elementary Math in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!