Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » how to read a dbf
Re: how to read a dbf [message #8214 is a reply to message #8205] Tue, 20 February 2007 08:38 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
A bug in DbfStream related to encoding - unable to cope with UTF8.

Non-perfect quick fix (line 228):

void DbfStream::SetCharset(byte cs)
{
	charset = cs;
	byte dest = GetDefaultCharset();
	if(dest == CHARSET_UTF8)
		dest = CHARSET_WIN1252;
	codepage_cv = false;
	for(int i = 0; i < 256; i++) {
		codepage_uni[i] = ToUnicode(i, charset);
		codepage_map[i] = FromUnicode(codepage_uni[i], dest);
		codepage_rev[i] = FromUnicode(ToUnicode(i, dest), charset);
		if(codepage_map[i] != i)
			codepage_cv = true;
	}
}


Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon4.gif
Read Message
Previous Topic: Cannot use *.mdb files
Next Topic: small patch for PostgreSQL
Goto Forum:
  


Current Time: Sun Aug 24 16:44:18 CEST 2025

Total time taken to generate the page: 0.08554 seconds