Utf 8 - Encoding UTF8 String To ISO-8859-1 String?
Sep 30, 2009I need to convert UTF8 string to ISO-8859-1 string using VB.NET.
View 6 RepliesI need to convert UTF8 string to ISO-8859-1 string using VB.NET.
View 6 RepliesI have problems sending sms using API. I need to sens sms encoded ISO-8859 The problem is encoding to ISO. Not runs
[Code]...
How could i read a string into a binary file Encoding.UTF8.(the string has a length of 25 bytes)
Using fs As New FileStream (OpenFileDialog1.FileName, FileMode.Open)
fs.Position = 2096
Using br As New BinaryReader (fs)
For x As Int16 = 2 To 25
[code]....
I'm having problems decoding a file with "ISO-8859-1" encoding.For example, I can't decode "%E7" to "รง".
View 1 RepliesI have a asp.net application and I uses ISO-8859-1 charset. But It is not OK. In the postback, I got ISO-8859-1 keycode. But the application response next time, it is display like this. How can convert to normal fonts.
ေနေကာင္းလား
I have been working on a project that opens, modifies, then saves an xml file. The problem is that one of the attribute values contains a dash, causing the parser to throw an error when my xml editor application attempts to open the file. I have yet to find a working solution after weeks of searching the web, I tried the the following method for saving the xml file[code]...
View 2 RepliesI had an interesting bug today when sending plain text emails from our system. We format messages like this: -1st something happened blab bla. -2nd something else happened blab blab blaa bla. Today we had an email that looked like this: -1st something happened blab bla. -2nd something else happened blab blab blaa bla $1000.00 -3rd Something happened. So above, we see that we lost the CrLf but only on the message that didn't have a period and ended in 0. I went through the code and found the CrLf is intack up until we send the email. I tracked the code down below, I am guessing it applies to C# as well:
[Code]...
i have a VB.NET program that handles the content of documents. The programm handles high volumes of documents as "batch"(>2Million documents;total 1TB volume) Some of this documents may contain control chars or chars like f0e8 [URL]). Is there a easy and especially fast way to remove that chars?(except space,newline,tab,...) If the answer is regex: Has anyone a complete regex for me?
View 2 RepliesI have a procedure that should produce a valid UTF8 string or file. But I must do something wrong as IE show the following error when I try to open the file in it:"Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/test.xml'. Line 1, Position 1"Below you'll find the code example.NB: The code example is in VB but I can also handle C#; that's why I've added the C# tag also.
Dim sfpXML As String = "C:TempTest.xml"
Dim msXML As New IO.MemoryStream
Dim xmlWriter As System.Xml.XmlWriter = Nothing
[code]....
I'm using this code to convert string to ISO8859-1
[code..]
But the problem is when an user writes this caracter:
EXAMPLE:
[code...]
I think that my code is wrong. Because if I send the same string encoded "price+80%2BVAT", Why in VB.NET code not runs and in PHP runs fine? Is the same encoded string.
I have a simple question about string. Consider following code:
Dim S1 as String = "abc"
What is the encoding for S1? Is that UTF-8 or depending on user windows local setting?
I am having a problem trying to resolve an apostrophe related issue. I have searched SO,
My clientside javascript code is: var strUserText = uSettings.replace(/'/g, "'")
after the above line is executed, the form does a submit
document.form1.submit(); in code behind, a class retreives those values:
sUserSettings = request.form("strUserSettings ") the result is a semi-truncated string.Given the above code process flow, how can I save "John O'Brady's ASP Blog" in to a database?
I thought I was saving "John O'Brady's ASP Blog" but that isn't working.
I have a long UTF8 encoded text string. The actual values stored in the string are hexadecimal. I want to convert the encoding and save to a binary file.
Is there a simple encoding.convert or other method to do this with?
Basically the output is twice as large as it needs to be right now. The long way of doing it would be a routine to go through the string two characters at a time and convert to byte array and then .writeallbytes I guess. It seems there must be a simpler way of converting this?
trying to find a decent answer for my question; I do have a utf8 file which I (down)load, manipulate and wanting to save back again.The result always is that the file I produce is not in utf8 format;
Dim fs2 As New FileStream("c: est.dat", FileMode.Create, FileAccess.Write, FileShare.None)
Dim w As New BinaryWriter(fs2, Encoding.UTF8)
[code].....
I am not sending any sensitive or security information in the query string. I am currently using Base64Encoding along with MD5 Hash. I want to shorten my url as far as possible.
[Code]...
Can I do anything more or less with IDictionary? How do these two collections differ?
View 5 RepliesI've been working with a sig capture application sample on a windows mobile device, The data is sent via IP to a host as a byte array and is then drawn onto the screen of the host as it appeared on the client. I was able to get this into the form of a bitmap object so I could print it or save to a jpg file. That all works well. The problem now is that I need to store this data in a database and then be able to recall it at a later time and recreate the signature image.
The byte array data is much smaller than the actual image so I would like to store it in that form. My issue is that when I convert this byte array into a string and back again my program can no longer re-create the image. Once I saw the problem I created the code below as a test and added the msgboxes to get an idea what was happened to my data.
[Code]....
my code is :
[Code]...
The error is Value of type '1-dimensional array of string' cannot be converted to 'String'.
I am generating an XML string with following code
Dim settings As New XmlWriterSettings()
settings.Indent = True
settings.Encoding = System.Text.Encoding.UTF8
[Code].....
I want the Function to accept List(Of String), Array & String and similarly return List(Of String), Array & String respectively. The Function simply adds a string (month) to the input collection. I just want to use it for string, array and list with needing to think of conversions.
[Code]...
Basically I have a webresponse stream:dim lol as string = readstream.tostring there is a lot of information within the string but only one link starting with http: located near the end of the string - however there is no constant character point where I can start... (i.e. 38)
I want to extract the link from the string i.e. dog cat plane car [URL]..that is approximately how it looks above - words and url substituted I want to just extract [URL]..I had an idea of parsing the string from http: to the end Then after that splitting the string up again to remove the }], however it does not return anything
I have an app to send SMS (developed using vb 2008) The characters allowed for the texts sms are them of "iso-8859-1" When the user writes in the textbox I do not want to allow him to write not allowed characters. Is there some instruction or function in VB 2008 to do it automatically?
I might create an "a bit "manual" function but before I prefer knowing if it exists something more automatic.
I got an app, which receives data via a R232 port, convert it to a string and on the other side I got a database, where the strings are saved. How can I find a way to compare the string with all strings in one database column and get back the another stringform the same row in this database. I never programmed a database
View 1 RepliesI have buttons generated through code (dynamically). I have to associate an event (the same) to them. I use AddHandler button.click, AddressOf mysub.The issue is that mysub gets a string (mysub(string)), but AddressOf doesn't accept a parameter inside the routine. How can I do this? Using also an alternative to AddressOf.
EDIT:
Public Class Form1
...
Private Sub mysub(ByVal sender As Object, ByVal e As System.EventArgs, ByVal str As String)[code]......
These is the content of my txt file which is saved in D drive in my pc abc,1,2,3..I tried the flowing but it didn't work:[code]I am getting error on this line.. data = line.Split(","c)...it says this line isn't in use anymore or something and that I rather use LineInput but thats asks for filenumber and i don't know what that is. I am sorry but I am a complete beginner. what else can I try? [code]ok that error is gone now but now if I want to add these values to a list box..how can i do that?
View 1 RepliesWhat is the best way to pass the four (4) parameters after the applicationName to the application to be launched?
Process.Start ("C:\MyApp.exe",
"CommChannel1",
"DeviceName",
"Language",
"UserName")
I have the following web method:
<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=True, XmlSerializeString:=True)> _
[Code].....
I wanted to use HttpGet here so that the result can be cached.
I tried every variation of calling this, but no luck. Is this possible with GET?
I have a field that I display via: String.Format({0:c},amount) This produces the string "$28.28" However, when I try to convert back to a decimal amount, I get an incorrect format exception: amount = Decimal.Parse(amount.Text, NumberStyles.Currency) I also tried it with NumberStyles.AllowCurrencySymbol with the same results. I verified that the value in amount.Text is "$28.28". Am I missing something? Shouldn't these two operations use the same currency symbol and formats?
View 2 RepliesI Ported this code from a code project article in c# called Nscript
heres the code
Base App
Imports System
Imports System.IO
Imports System.Resources
[code]....
Okay Now I only get two errors (I dont know how to solve them)
Error3Class 'BaseApp' must implement 'Sub OnCompilerError(errors() As CompilerError)' for interface 'IScriptManagerCallback'.
And
Error4Class 'ScriptManager' must implement 'Sub CompileAndExecuteFile(file As String, args() As String, callback As IScriptManagerCallback)' for interface 'IScriptManager'.
But What I would also Like to know (as well as how to fix the errors), is would the code work?
I need a regular expression that can validate that a string is an alphanumeric comma delimited string.
Examples:
123, 4A67, GGG, 767 would be valid.
12333, 78787&*, GH778 would be invalid
fghkjhfdg8797< would be invalid
This is what I have so far, but isn't quite right: ^(?=.*[a-zA-Z0-9][,]).*$