[Pkg-mono-devel] Mono escape shell characters

David Schmitt david at dasz.at
Fri Sep 2 08:18:09 UTC 2011


On 31.08.2011 10:51, The87Boy wrote:
> I receive it as question marks, but I will like to receive it as the actual
> letters e.g. the danish letters æ, ø and å

In that case, you're probably running into an character set/encoding 
problem.

tl;dr: C# makes encodes the letters into a different kind of bytes than 
gammu/your phone expects.

For more information on character sets, see Spolsky's "The Absolute 
Minimum Every Software Developer Absolutely, Positively Must Know About 
Unicode and Character Sets (No Excuses!)" 
(http://www.joelonsoftware.com/articles/Unicode.html)

To put values into your environment variables (which are probably what 
you mean when you say "shell variables"), use the System.Environment 
class. See the stackoverflow question: 
http://stackoverflow.com/q/185208/4918 and the MSDN documentation: 
http://msdn.microsoft.com/en-us/library/z8te35sa.aspx

To encode strings to bytes, use one of the implementations of 
System.Text.Encoding. See the MSDN documentation: 
http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx


Best Regards, David



More information about the Pkg-mono-devel mailing list