[Geomoose-users] Special characters - "sh", "ch", "zh" - Central European symbols - part 2

Nelson Soto NSoto at plotplans.com
Tue Nov 4 11:19:55 EST 2008


This may or mat not apply so take it with a grain of salt:

 

When I experimented using ArcSDE 9.x w/ MSSQL Express as a source for GeoMoose, I experienced an issue regarding the display of labels from an SDE source. 

 

The issue I had was MapServer related and was in regards to MapServer’s somewhat lack of UTF-8 implementation so-to-speak. It actually accepts UTF-8 just fine, but any UTF-8-ish encoding sent to MapServer is attempted to be converted into UTF-8 which is more often than not unsuccessful. The “problem” with Windows is that it supports UTF-16 natively and so it must convert any UTF-8 to that or another encoding each time. So, it is not efficiently necessarily to implement UTF-8 encoding on a Windows box. I quote “problem” because I don’t really think it is as they support a better version of UTF but until the rest of the world catches up I guess it is an obstacle. 

 

Ok, so, how to work around the issue I had: It required dumping ArcSDE’s settings to a file and editing the Unicode encoding setting to disabled. Then all stored data needed to be reimported to take that into affect. This works because the default collation of MSSQL is latin1, and it would no longer be Unicode encoded latin1, or UTF-8-ish. The downfall is you can only use characters in the set of latin1, which I think as you describe will not cut it for you.

 

If your data passes through MapServer, then maybe some of this info is pertinent; some of it not-so-much but it may be a start for your investigation.

 

________________________________

From: Matej [mailto:matej at matnet.net] 
Sent: Tuesday, November 04, 2008 11:06 AM
To: Dan Little; geomoose-users at lists.sourceforge.net
Subject: Re: [Geomoose-users] Special characters - "sh", "ch","zh" - Central European symbols - part 2

 

Still the same - I have been looking at the getHTTPObject - could it be possible that it is connected to it somehow? Or with the part of the code where the results are "GET" from MapServer? 

 

Matej Serc

matej at matnet.net

	----- Original Message ----- 

	From: Dan Little <mailto:danlittle at yahoo.com>  

	To: Matej <mailto:matej at matnet.net>  ; geomoose-users at lists.sourceforge.net 

	Sent: Tuesday, November 04, 2008 4:52 PM

	Subject: Re: [Geomoose-users] Special characters - "sh", "ch", "zh" - Central European symbols - part 2

	 

	(Further "Shot in the Dark")
	
	Okay, I would think about doing the following...
	1) Remove the Doctype
	2) Remove the meta http-equiv tag.
	
	Clear cache, reload, see what happens.

	 

	
________________________________


	From: Matej <matej at matnet.net>
	To: Dan Little <danlittle at yahoo.com>; geomoose-users at lists.sourceforge.net
	Sent: Tuesday, November 4, 2008 9:45:03 AM
	Subject: Re: [Geomoose-users] Special characters - "sh", "ch", "zh" - Central European symbols - part 2
	
	 

	Yes, no matter what encoding is set in index.html the output in the GeoMoose in the div "content_results_form" is always the same - same strange characters (for example the char after "o" in this string: "Naro�nik". There is supposed to be the symbol for "ch".).

	 

	Matej Serc

	matej at matnet.net

		----- Original Message ----- 

		From: Dan Little <mailto:danlittle at yahoo.com>  

		To: Matej <mailto:matej at matnet.net>  ; geomoose-users at lists.sourceforge.net 

		Sent: Tuesday, November 04, 2008 4:31 PM

		Subject: Re: [Geomoose-users] Special characters - "sh", "ch", "zh" - Central European symbols - part 2

		 

		Have you tried changing the encoding settings in the index.html file?

		 

		
________________________________


		From: Matej <matej at matnet.net>
		To: geomoose-users at lists.sourceforge.net
		Sent: Tuesday, November 4, 2008 9:17:31 AM
		Subject: Re: [Geomoose-users] Special characters - "sh", "ch", "zh" - Central European symbols - part 2

		Hi,

		 

		I was looking at MapScript which would be an option, but due to the following fact I think that there must be an "easier" solution maybe with some XML settings or something like that - when I click on the "Identify" tool and the result is open in the div "content_results_form" as a part of the GeoMoose window, the characters DO NOT appear correctly. But when I get the direct link to the MapServer call (vith FireBug) that is being called by Geomoose, e.g. "http://xxx.xxx.xxx.xxx/cgi-bin/mapserv?map=/home/webuser/identif.map&mapxy=468286.9195712629%20125082.02776175489&imgext=468282.0218372162%20125066.72580171067%20468308.97320987994%20125086.39975033894&layers=Boxes&imgsize=974%20711&mode=nquery" in a separated window or a tab, those characters DO appear correctly. And also when I set the charset of that window when the data is appearing correctly the same charset as the GeoMoose window has, they look as they should.

		 

		That is the fact that is bothering me and I suspect that some method which performs the "call" of the Mapserver from GeoMoose isn't capable of getting data differently than in utf-8, but it proves that MapServer is returning the data in the iso-8859.2 charset correctly.

		 

		Thank you in advance,

		Matej Serc

		matej at matnet.net

			----- Original Message ----- 

			From: Fischer, Brian <mailto:bfischer at houstonengineeringinc.com>  

			To: Matej <mailto:matej at matnet.net>  ; geomoose-users at lists.sourceforge.net 

			Sent: Monday, November 03, 2008 9:48 PM

			Subject: RE: [Geomoose-users] Special characters - "sh", "ch","zh" - Central European symbols - part 2

			 

			Matej,

			 

			I think this would be a question for the mapserver mailing list.  I have never used international characters so I have no experience with them.  I wonder if it is an issue with the MapInfo format. I do know mapserver encodes the attributes for HTML, but will leave them as is if you do something like this:

			 

			[DBASE item name],[DBASE item name_esc],[DBASE item name_raw] 

			Item name from the attribute table of a queried layer. Only attributes for the active query layers are accessible. Case must be the same as what is stored in the DBASE file. ArcView, for example, uses all caps for shapefile field names. Available only when processing query results.

			By default the attributes are encoded especially for HTML representation. In addition the escaped version (for use in URLs) as well as the raw data is available.

			This is from the mapserver website under the template reference guide (http://mapserver.gis.umn.edu/docs/reference/templatereference/referencemanual-all-pages).  Maybe it wonʼt do this for MapInfo files.

			 

			Just an idea,

			Brian

			 

			Brian Fischer

			Houston Engineering, Inc.

			Maple Grove, MN

			(763) 493-4522

			 

			From: Matej [mailto:matej at matnet.net] 
			Sent: Monday, November 03, 2008 2:36 PM
			To: geomoose-users at lists.sourceforge.net
			Subject: [Geomoose-users] Special characters - "sh", "ch","zh" - Central European symbols - part 2

			 

			Hi,

			 

			I have been further investigating this issue and I am out of ideas what to do. Let me explain more. I have data with those symbols in a MapInfo (.TAB file has the entry !charset WindowsLatin2 for charset definition). As I mentioned before, MapServer returns correct data and when I open it in the different browser everything is displayed as it should be.

			But when the results are open in the div inside geomoose, it is always (and I mean always) displayed in utf-8 encoding. I have found out that it is typical behaveour for setRequestHeader to always return data in utf-8. I tried adding "charset=iso-8859-2" to those two setRequestHeader calls, but I get no different results. 

			Now I don't know if I should also write on the MapServer's mailing list if there is a chance to convert the data from mode=nquery to specified encoding since I think that I MUST get the results of the query in utf-8 from Mapserver otherwise this won't work. But searching around, there is no option for that. 

			 

			Maybe there is a way of replacement some characters before displaying them? 

			 

			Thank you for any help in advance,

			Matej Serc

			matej at matnet.net

		 

	 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20081104/a2aa036f/attachment.html


More information about the Geomoose-users mailing list