Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I know about regex.Replace, but is there any way to convert "weird" characters (alfabetic) to plain ISO (english) characters.

 

example: VIDOVI� = VIDOVIC

�AVAR = I don't have a clue what this is :-\

 

Perhaps I should get the code tables used for those characters and convert them?

 

Thanks!

Posted

I'm kind of confused about what you are trying to accomplish but I would think the best thing to do would be to create some kind of a lookup table as you kind of thought of doing in the first place. The best, I think, would be to look up the unicode/ascii value of each character in a string and substitute it with the desired value.

 

In the example above you would cycle through VIDOVI� character by character and come up with V, I, D, O, V, I, C, "" (at least I assume the � turned into a null string).

Posted

Well, I solved it with string.replace... I made a replace for all my weird charactes, and that's it. I just run every string throught these string.replace statements, and that's it.

I actually thought it would take longer, but there is almost no difference.

 

Thanks anyway!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...