Click here to Skip to main content
Rate this: bad
good
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 8:34am
h7h7h7444
Comments
Nelek at 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 at 14-Apr-12 13:58pm
   
Where should I check it ??
Nelek at 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 at 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 at 14-Apr-12 16:05pm
   
Shahin thnx.... but I cant repair it still..... can you explain short....what ecaxtlu should I do..!
Shahin Khorshidnia at 14-Apr-12 17:04pm
   
Did you follow the link?
VJ Reddy at 14-Apr-12 21:08pm
   
Good link. 5!
Shahin Khorshidnia at 15-Apr-12 4:10am
   
Thanks
besarto at 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 at 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 at 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 at 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 at 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
0 Sascha Lefévre 490
1 Sergey Alexandrovich Kryukov 413
2 Maciej Los 210
3 Abhinav S 205
4 Richard Deeming 170
0 Sergey Alexandrovich Kryukov 6,928
1 OriginalGriff 6,381
2 Maciej Los 2,782
3 Abhinav S 2,732
4 Peter Leow 2,694


Advertise | Privacy | Mobile
Web03 | 2.8.150414.1 | Last Updated 15 Apr 2012
Copyright © CodeProject, 1999-2015
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