Unicode Woes & VB.NET

  • Thread starter Stilgar[bbs.isca.uiowa.edu]
  • Start date
S

Stilgar[bbs.isca.uiowa.edu]

I have a VB.NET app that is made up of several fill-in-the-blank-type
forms that allows non-technical people convert articles, press
releases and publications into XML.

For publications created in Adobe PageMaker, and a lot of the data
entered is just cut from PageMaker and pasted into my app.

My problem is that PageMaker uses em-dashes, typographer's quotes (the
slanty quotes `` and ''), etc. and they remain as such when pasted
into my app.

I haven't had any problems converting ASCII char's to their XML
equivalents (using the Replace() function), but I haven't had much
luck with these extended chars.

I know VB.NET is unicode goodness, and I've looked up the unicode
values for the chars that need to be replaced, but I haven't had much
luck.

There are really two problems here.

The first is that the dashes, apostrophe's and typographer's quotes
appear normally when you paste them into my RichTextBox, but they
don't seem to make it back out.

The other problem is that I can't even get the dang things to print in
a message box. The following code just prints the empty box that
appears when Windows doesn't know what character to render.

Dim myChar As Char
myChar = ChrW(&H2036) 'Typographer's Open Quote
MsgBox("Character:" & myChar, MsgBoxStyle.Exclamation, "Char Result")

Someone suggested that I need to install the right language pack. If
these characters are not supported in my existing language/font packs,
why am I able to see them in my RichTextBox?

Can someone throw me a bone here? I've only coded two other VB.NET
apps, and need some help.

Thanks in advance!
 
S

Stilgar[bbs.isca.uiowa.edu]

Nevermind, I'm an idiot. This program is a project I've been working
on in my spare time for the last two years. For some reason this
problem has stumped me until now. I did some reading up on
System.Text.Encoding and I brushed up on ANSI, ASCII, UTF-n, etc. and
I was able to get this figured out. I was going in completely the
wrong direction.
 
S

Stilgar[bbs.isca.uiowa.edu]

Nevermind. I figured out my problem. I was going in completely the
wrong direction. I did some brushing up on ANSI, ASCII, and UTF-8/16,
plus some reading up on System.Text.Encoding and I was able to figure
out my problem.

It's one of those things that you go berzerk trying to figure out
what's going on and then you discover you are the problem.
 
S

Stilgar[bbs.isca.uiowa.edu]

Nevermind. I figured out my problem. I was going in completely the
wrong direction. I did some brushing up on ANSI, ASCII, and UTF-8/16,
plus some reading up on System.Text.Encoding and I was able to figure
out my problem.

It's one of those things that you go berzerk trying to figure out
what's going on and then you discover you are the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top