Click here to Skip to main content
12,444,748 members (55,032 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
When I sort the data, there is a problem like that:
e.x the words 'Kosovë' is part of a file...

in sort form the character "ë" isn't but in place of this character there is something like that " ● "...
Posted 14-Apr-12 7:34am
h7h7h7444
Comments
Nelek 14-Apr-12 13:40pm
   
Have you checked the regional settings or the language settings of the project? Special characters like äöüáéíóú and so on, don't get always correctly "translated".
besarto 14-Apr-12 13:58pm
   
Where should I check it ??
Nelek 14-Apr-12 16:56pm
   
To be honest... I can't tell you. It has been a long time without using visual studio. Is it a Unicode Build?
besarto 15-Apr-12 5:37am
   
I solve the problem thnx to all.....I just should use this code " System.Text.Encoding.Default" ..... thankyou
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
besarto 14-Apr-12 16:05pm
   
Shahin thnx.... but I cant repair it still..... can you explain short....what ecaxtlu should I do..!
Shahin Khorshidnia 14-Apr-12 17:04pm
   
Did you follow the link?
VJ Reddy 14-Apr-12 21:08pm
   
Good link. 5!
Shahin Khorshidnia 15-Apr-12 4:10am
   
Thanks
besarto 15-Apr-12 5:14am
   
Yes Shahin, I follow it... original text where I put it in a textbox there is ok with characters, but when I make words double there is a problem..... e.x
Kosovë is a small contry in europe.( that is a file data.txt) when I put it in textbox there is no problem with "ë"...
Now the problem is when I split this sentences like that:
Kosov ● is
is a
a small
small country

so when a make double words this character " ● " is in a place of "ë"
besarto 15-Apr-12 5:36am
   
I solve the problem thnx to all.....I just should use this code " System.Text.Encoding.Default" ..... thankyou
Shahin Khorshidnia 15-Apr-12 7:28am
   
Ok, Thank God!
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

I think there may be 2 issues.

1. The font of the control in which the text is being is displayed, may not be capable of showing the letters specific to the that type. So, try setting the Font of the Control to the one, which can handle those characters.
2. There may be an issue with the CurrentCulture. So, try setting the CurrentCulture to the culture appropriate culture for the above characters, like
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo 
("hi-IN");
The list of Culture Codes are given here
Culture Names [C#][^]

and here
http://msdn.microsoft.com/en-us/goglobal/bb896001[^]

The advantage of setting the CurrentCulture to the appropriate culture specific to the above characters, is that, it will ensure proper sorting.
  Permalink  
v2
Comments
besarto 15-Apr-12 5:37am
   
I solve the problem thnx to all.....I just should use this code " System.Text.Encoding.Default" ..... thankyou
VJ Reddy 15-Apr-12 5:43am
   
You're welcome.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

besarto wrote:
I solved the problem thanks to all.....I just should use this code
System.Text.Encoding.Default
Thank you
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 15 Apr 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100