Error in build 'DotSpatial.Positioning'

Mar 7, 2012 at 6:33 AM
Edited Mar 7, 2012 at 6:36 AM

Hello Folks!

I can not build 'DotSpatial.Positioning' successfully due to some bad characters in the source file. Just like the following: 

newValue.Replace("?, " ").Replace("'", " ").Replace("\"", " ").Replace("  ", " ");

By the way, I'm trying to build it with Microsoft visual studio 2010 prepositional (Chinese) on Windows 7.

Please help, thank you! 

Regards,

yanweigps

Developer
Mar 7, 2012 at 3:54 PM

I've heard of someone else that had that problem, too. You want to use this line

newValue.Replace("°"" ").Replace("'"" ").Replace("\""" ").Replace("  "" ");

You can also browse the source online.

http://dotspatial.codeplex.com/SourceControl/changeset/view/65571

Mar 8, 2012 at 5:17 AM

Hi again!

The source on line also have the same problem, just like <format = "HH�MM'SS.SSSS\"i";>.

May be it caused by my OS(Win7 Chinese). Is the sources saved as ASCII or UNICODE?

 

Regards,

yanweigps 


Developer
Mar 8, 2012 at 8:04 PM

$/dotSpatial/DotSpatial.Positioning/DotSpatial.Positioning/Angle.cs etc were in Windows-1252 Encoding.

I've modified these in the latest checkin. Does this help?

Mar 9, 2012 at 11:02 AM

Hello mudnug!

Thanks for attempting to help! But it still doesn't work. I believe save all the sources as UTF-8 encoding will be OK!

Regards,

yanweigps

Developer
Mar 9, 2012 at 8:23 PM

Which one is causing the problem, now?

Mar 10, 2012 at 6:05 AM
Edited Mar 10, 2012 at 6:07 AM

It's still the old problem, just like <format = "HH�MM'SS.SSSS\"i";>!

UTF-8 is the right encoding format for the non-anscii characters, and it supported by almost every computer in the world.

Developer
Mar 12, 2012 at 7:32 PM

The encoding on $/dotSpatial/DotSpatial.Positioning/DotSpatial.Positioning/Latitude.cs and $/dotSpatial/DotSpatial.Positioning/DotSpatial.Positioning/Longitude.cs is already utf-8.

Sorry that didn't help you.

Developer
Mar 12, 2012 at 7:32 PM

The string should look like 

format = "HH°MM'SS.SSSS\"i";
Mar 13, 2012 at 8:38 AM

Hello mudnug!

Maybe we are struggling on a simple problem.

I open the 'Longitude.cs ' with programmer's notepad, and it show that the source is encoded with ANSI but not UTF-8, are you sure you have re-encoded the source file?

Could you send the 'Longitude.cs' file directly to my mail box(yanweigps@hotmail.com) as a attachment. Two copy of the 'Longitude.cs' can easy us to locate the problem: one copy encoded in ANSI and another encoded in UTF-8. Thanks.

By the way, Windows-1252 is the default encoding style for Western Europe, but it's not the case for other parts of the world.

Please encode the  source file 'Longitude.cs'  with UTF-8 and send it to 'yanweigps@hotmail.com', then we can locate the problem.

Thanks for help.

Developer
Mar 13, 2012 at 4:45 PM

Here is the file: http://min.us/mqe2DbHgH

I've re-encoded the files as UTF-8 with signature.

It seems the encoding to UTF-8 didn't really do much.

See the latest changeset for the rest of the files.

Mar 14, 2012 at 5:20 AM
Edited Mar 14, 2012 at 5:26 AM

Hello again!

It worked! The file ' http://min.us/mqe2DbHgH'  re-encoded with UTF-8 can display correctly on my system.

So please re-encode all sources include '°' with UTF-8,It will help a lot for the developers and users  from non-English speaking countries.

Thanks a lot for help.

Cheers,

yanweigps

Developer
Mar 14, 2012 at 6:33 PM
Edited Mar 14, 2012 at 6:33 PM

Glad to hear of your success. Good news, as re-encoding was already done.

See the latest changeset for the rest of the files.

Mar 22, 2012 at 2:11 PM

Hello mudung!

Would you please save the 'Area.cs' to UTF-8,  there are many characters can not display correctly on my system. Just like the following:

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

 

Thank you in advance.

Developer
Mar 22, 2012 at 3:36 PM

OK. See changeset Fix: encode Area.cs as UTF-8

Mar 22, 2012 at 5:25 PM

The “Compass.cs” file in the solution ' DotSpatial.Positioning.Forms' has to be converted to UTF-8 due to some un-ansi characters. 

Thank you.

Developer
Mar 22, 2012 at 7:44 PM

Done