473,396 Members | 1,826 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,396 software developers and data experts.

WTF is a 'Unicode (UTF-8)' fallback?!

I just converted a project fromo VB 2003.Net to 2005. Now, I am gettng this
error:

The output char buffer is too small to contain the decoded characters,
encoding 'Unicode (UTF-8)' fallback

Here is the code:
Dim strRead As String = ""
Dim fsReadStream As New FileStream(L3FileName, FileMode.Open,
FileAccess.Read)
Dim brReader As New BinaryReader(fsReadStream)
Dim ByteArray() As Byte
Dim n As Integer
While brReader.PeekChar() -1 '<-----Fails here and just gets stuck
ByteArray = brReader.ReadBytes(1)
strRead = strRead & byteArrayToString(ByteArray)
n = fsReadStream.Position
If InStr(strRead, "<EndTag>") Then
Exit While
End If
End While
Public Function byteArrayToString(ByVal b() As Byte) As String
Dim i As Integer
Dim s As New System.Text.StringBuilder
For i = 0 To b.Length - 1
s.Append(Chr(b(i)))
Next
Return s.ToString
End Function

I am reading a file and it appears to get stuck on some non-standard
characters in the file.

TIA,
--
Anil Gupte
www.keeninc.net
www.icinema.com
Mar 24 '08 #1
0 873

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

Similar topics

4
by: sinasalek | last post by:
i have a problem with MySQL 4.1.x and UTF8. in version 4.0, i'm using html forms with utf8 charset for inserting unicode strings. but in version 4.1.x it is not working! if i change the charset of...
1
by: F. Petitjean | last post by:
Python has a very good support of unicode, utf8, encodings ... But I have some difficulties with the concepts and the vocabulary. The documentation is not bad, but for example in reading...
14
by: Koulbak | last post by:
I have some unicode (utf8) text file. I _tried_ to write a simple program that read one of them and write it to the standard output but... of course it doesn't work. There is an easy way to do it?...
7
by: Csaba Gabor | last post by:
If I do alert(encodeURI(String.fromCharCode(250))); (in FF 1.5+ or IE6 on my winXP Pro) then I get: %C3%BA Now I was sort of expecting something like %u... (and a single (4 digit?) unicode hex...
1
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was...
3
by: Joshua Morgan | last post by:
Hey, Currently me and a friend are coding up a new BitTorrent tracker. We have a torrents table that has a column called 'info_hash' which contains the info_hash as received by the announce.php...
3
by: roland.saad | last post by:
Hi Everyone, I have been trying to build a website that has multilingual support using the LAMP setup. I have created tables that store language information and correlate different strings ids...
3
by: brevello | last post by:
Hi, I'm trying to parse an XML file with Python SAX: xml.sax If i parse the file with an empty Handler it works perfectly, no error of mismathed tag. But if i try to print the characters of the...
0
by: lovzan | last post by:
hello; i work on vb.net with mysql database i use ADO. the problem is that i can't insert into the table arabic or other unicode string. Dim rs As New ADODB.Recordset rs.Open("select * from...
8
by: Yves Dorfsman | last post by:
Can you put UTF-8 characters in a dbhash in python 2.5 ? It fails when I try: #!/bin/env python # -*- coding: utf-8 -*- import dbhash db = dbhash.open('dbfile.db', 'w') db = u'☺'
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.