473,326 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

I need to paste an RTF non-ANSI string into a RichTextBox

I need to paste an RTF non-ANSI string into a RichTextBox.

I know how to do that if the string were all ANSI characters.

But the text contains Unicode characters that have no ANSI equivalent. I
don't know how to include them.

Can you help?

Thanks
Nov 17 '05 #1
3 3092
You can include them just fine. It just might be that the font doesn't
support them.

Why not use a font that supports those characters?

Or are you trying to strip these characters?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

" **Developer**" <RE*************@a-znet.com> wrote in message
news:O6*************@TK2MSFTNGP15.phx.gbl...
I need to paste an RTF non-ANSI string into a RichTextBox.

I know how to do that if the string were all ANSI characters.

But the text contains Unicode characters that have no ANSI equivalent. I
don't know how to include them.

Can you help?

Thanks

Nov 17 '05 #2
Private Sub DisplayCulture(ByVal Code As String)

Dim CI As CultureInfo = New CultureInfo(Code, False)

Dim MyRI1 As New RegionInfo(CI.LCID)

---snip

mStr = MyRI1.CurrencySymbol & ControlChars.Tab & "Currency symbol"

I do the above for say, Arabic, and then drawn mStr on a picturebox and copy
mStr to the clipboard.

The string mStr displays OK on the picture box but pasting from the
clipboard into a RichTextBox or into Word show ? where Arabic characters
were.

Got any idea what is going on?

I assumed the problem is converting these symbols to RTF which is all ANSI
is needed.

Thanks



"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OK****************@TK2MSFTNGP12.phx.gbl...
You can include them just fine. It just might be that the font doesn't
support them.

Why not use a font that supports those characters?

Or are you trying to strip these characters?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

" **Developer**" <RE*************@a-znet.com> wrote in message
news:O6*************@TK2MSFTNGP15.phx.gbl...
I need to paste an RTF non-ANSI string into a RichTextBox.

I know how to do that if the string were all ANSI characters.

But the text contains Unicode characters that have no ANSI equivalent. I
don't know how to include them.

Can you help?

Thanks


Nov 17 '05 #3
It looks like the font you are using in your rich text box doesn't
support the characters that you are trying to insert. You say you draw it
on a picturebox. Is the font you use to render the image on the picturebox
the same font that the characters are being written in on the rich text box?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

" **Developer**" <RE*************@a-znet.com> wrote in message
news:OE**************@TK2MSFTNGP12.phx.gbl...
Private Sub DisplayCulture(ByVal Code As String)

Dim CI As CultureInfo = New CultureInfo(Code, False)

Dim MyRI1 As New RegionInfo(CI.LCID)

---snip

mStr = MyRI1.CurrencySymbol & ControlChars.Tab & "Currency symbol"

I do the above for say, Arabic, and then drawn mStr on a picturebox and
copy mStr to the clipboard.

The string mStr displays OK on the picture box but pasting from the
clipboard into a RichTextBox or into Word show ? where Arabic characters
were.

Got any idea what is going on?

I assumed the problem is converting these symbols to RTF which is all ANSI
is needed.

Thanks



"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OK****************@TK2MSFTNGP12.phx.gbl...
You can include them just fine. It just might be that the font
doesn't support them.

Why not use a font that supports those characters?

Or are you trying to strip these characters?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

" **Developer**" <RE*************@a-znet.com> wrote in message
news:O6*************@TK2MSFTNGP15.phx.gbl...
I need to paste an RTF non-ANSI string into a RichTextBox.

I know how to do that if the string were all ANSI characters.

But the text contains Unicode characters that have no ANSI equivalent. I
don't know how to include them.

Can you help?

Thanks



Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jimmy Tran | last post by:
Hi All, I have a table below and I want to design a query to pull all the members from the TABLE into a Query Result and into a single column with points assigned appropriately, but I am having...
38
by: lawrence | last post by:
I'm just now trying to give my site a character encoding of UTF-8. The site has been built in a hodge-podge way over the last 6 years. The validator tells me I've lots of characters that don't...
6
by: William J. Leary Jr. | last post by:
I'm running a VB6 program, the IDE for a compiler. Paste doesn't work if the text was cut/copied from within the program. That is: 1. Cut/copy inside the program, can't paste. Program:...
4
by: Bilo | last post by:
I have a Windows Forms Class MainGUI I have declared MainGUI maingui; public System.ComponentModel.Container components = new Container(); in the Class I call another class MediaDriver with...
3
by: Daniel | last post by:
Hi everyone, Does anyone know which control allows user to copy any data(text/non-text) from external source and paste in the X control. The X control will display everything just like the copied...
2
by: steph | last post by:
Hi, Access 2002: We've got a DataSheet-Form with a Combobox-field that shows strange behaviour. The ComboBox is constrained to the list so if we paste a value not existing in the list we get...
92
by: Ray | last post by:
I just moved to another company that's mainly a Java/.NET shop. I was happy to find out that there's a movement from the grassroot to try to convince the boss to use a dynamic language for our...
9
by: =?iso-8859-1?q?C=E9dric_ELLENA?= | last post by:
Hi, I need to make a little c# program which copies a text into the clipboard and that pastes this data into the active window. I copy the data like this Clipboard.SetText("mystring"); ...
2
by: msj | last post by:
Hi I have a problem with encoding non-ascii characters in a web application. The application uses Paste and Mako. The code is here: http://www.webudkast.dk/demo.txt The main points are: ...
2
by: nelsonbrodyk | last post by:
Hey All, I am trying to implement buttons that follow the command pattern. .NET exposes ApplicationCommands.Cut, copy and paste. I am trying the following: <Button...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.