This project is read-only.

Encoding of source codes.

Feb 2, 2010 at 4:24 PM
Edited Feb 2, 2010 at 4:37 PM

Hi,

I have read your great GPS article at codeproject.com and that followed me to this library.

How about considering using utf-8 encoding to source files? I'm using Korean(cp949) as default system encoding, and have a problem with opening some files. For example, line 1804 of Area.cs is opened like following line.

format = format.Replace("U", "cm?);

YES, due to incomplete string literal, there are lots of compile errors. I guess octet value of square mark is in a range of 128-255. As you know, this range is used as first byte of DBCS character.

Your little effort will help about one third of human race. About 2 billion people, Chinese, Japanese and Korean, suffer from encoding problem.

FYI: You can change file encoding by selecting "File/Save as" menu item in Visual Studio 2008, you will encounter encoding selection dialog when you press down-ward button of a Save button in Save as the dialog.

I have converted following files, and it shows me no errors now. Following encodings are detected by file tool from linux.

Angle.cs;               ISO-8859 C++ program text, with CRLF line terminators
Area.cs;                ISO-8859 English text, with CRLF line terminators
Azimuth.cs;             ISO-8859 English text, with CRLF line terminators
Elevation.cs;           ISO-8859 C++ program text, with CRLF line terminators
EventArgs.cs;           ISO-8859 C++ program text, with CRLF line terminators
GeographicRectangle.cs; ISO-8859 C++ program text, with CRLF line terminators
Latitude.cs;            ISO-8859 English text, with CRLF line terminators
Longitude.cs;           ISO-8859 English text, with CRLF line terminators
Position.cs;            ISO-8859 C++ program text, with CRLF line terminators
RectangleD.cs;          ISO-8859 C++ program text, with CRLF line terminators
Speed.cs;               ISO-8859 English text, with CRLF line terminators

Thanks,
laphir.