INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Funny Character in String

Funny Character in String

(OP)
I have a web page written in web express 2012 using vb.net
using webform


i am copying a text field from an existing database and adding it to another

Dbe = New DAO.DBEngine()
Db = Dbe.OpenDatabase(svr)

etc
Rs.Fields("Title").Value = TextBox4.Text
Rs.Fields("Composer").Value = TextBox9.Text

textbox4 contains as below
notice the ' above the o

AclamaciĆ³n 1

when this line is written out to the title field it converts it to asc 243 and shows 243 rather than
the o with a ' above it

Is there any way to get it written out correct it...


Regards Trob70

RE: Funny Character in String

Possibly the code page. By default, it is UTF-8. Try changing it to windows-1252.

RE: Funny Character in String

(OP)
xwb Thanks for your reply

I am not real sure how to carry out your idea.

Basically what i am doing is just

load an access database into a gridview

then transfer content to a textbox

gridview looks like

AclamaciĆ³n 1 (misa Querubines Para



in the textbox i get


Aclamación 1 (misa Querubines Para


Dim x As String
x = GridView1.Rows(y).Cells(1).Text
TextBox4.Text = x




Note.....
if i just manually copy and paste it works fine


Appreciate any ideas

Regards Trob70

RE: Funny Character in String

Try decoding the string before you display it:

CODE

Server.HTMLDecode(<your field here>) 

RE: Funny Character in String

(OP)
jbenson001


Thanks very much , this worked fine

Dim x As String
x = Server.HtmlDecode(GridView1.Rows(y).Cells(1).Text)
TextBox4.Text = x


Much appreciated.. it was driving me ''mad''


Regards Trob70

RE: Funny Character in String

Glad to help

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close