lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicholas Paldino [.NET/C# MVP]" <casper...@caspershouse.com>
Subject RE: Umlauts as Char
Date Tue, 08 Feb 2011 03:46:33 GMT
Prescott,

	You can simply use the Unicode escape sequence in code and in
string/character literals, as specified by section 2.4.2 of the C# spec
(http://msdn.microsoft.com/en-us/library/aa664670(v=vs.71).aspx):

        else if ( buffer.charAt( c ) == 'ü' ) {
          buffer.setCharAt( c, 'u' );
        }

	Would become:

        else if ( buffer.charAt( c ) == '\u00C3¼' ) {
          buffer.setCharAt( c, 'u' );
        }

	Hope this helps.

		- Nick

-----Original Message-----
From: Prescott Nasser [mailto:geobmx540@hotmail.com] 
Sent: Monday, February 07, 2011 8:55 PM
To: lucene-net-dev@lucene.apache.org
Subject: Umlauts as Char



Hey all, 
 
So while digging into the code a bit (and pushed by digy's Arabic conversion
yesterday). I started looking at the various other languages we were missing
from java.
 
I started porting the GermanAnalyzer, but ran into an issue of the
Umlauts...
 
http://svn.apache.org/viewvc/lucene/java/tags/lucene_2_9_4/contrib/analyzers
/common/src/java/org/apache/lucene/analysis/de/GermanStemmer.java?revision=1
040993&view=co
 
in the void subsitute function you'll see them:
 
        else if ( buffer.charAt( c ) == 'ü' ) {
          buffer.setCharAt( c, 'u' );
        }

This does not constitue a character in .net (that I can figure out) and thus
it doesn't compile. The .java file says encoded in UTF-8. I was thinking
maybe I could do the same thing in VS2010, but I'm not finding a way, and
searching on this has been difficult.
 
Any ideas?
 
~Prescott 		 	   		  =




Mime
View raw message