Commit 610d1dc7 authored by kocienda's avatar kocienda
Browse files

Fixed a problem in this function where broken UTF-8 would cause a crash.

        * WebCore.pbproj/project.pbxproj:
        * kwq/KWQString.mm:
        (QString::fromStringWithEncoding)


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e5f72416
2002-08-30 Ken Kocienda <kocienda@apple.com>
Fixed a problem in this function where broken UTF-8 would cause a crash.
* WebCore.pbproj/project.pbxproj:
* kwq/KWQString.mm:
(QString::fromStringWithEncoding)
2002-08-30 Richard Williamson (Home) <rjw@apple.com>
Removed debugging log.
......
2002-08-30 Ken Kocienda <kocienda@apple.com>
Fixed a problem in this function where broken UTF-8 would cause a crash.
* WebCore.pbproj/project.pbxproj:
* kwq/KWQString.mm:
(QString::fromStringWithEncoding)
2002-08-30 Richard Williamson (Home) <rjw@apple.com>
Removed debugging log.
......
2002-08-30 Ken Kocienda <kocienda@apple.com>
Fixed a problem in this function where broken UTF-8 would cause a crash.
* WebCore.pbproj/project.pbxproj:
* kwq/KWQString.mm:
(QString::fromStringWithEncoding)
2002-08-30 Richard Williamson (Home) <rjw@apple.com>
Removed debugging log.
......
......@@ -72,7 +72,6 @@
F58C8A07025BD3BC018635CA,
F531DDEC02F0C34D018635CA,
);
hasScannedForEncodings = 1;
isa = PBXProject;
knownRegions = (
English,
......
......@@ -728,20 +728,17 @@ void QString::setBufferFromCFString(CFStringRef cfs)
}
}
// This function is used by the decoder. It will be replace with TEC eventually.
// This function is used by the decoder. It will be replaced with TEC eventually.
QString QString::fromStringWithEncoding(const char *chs, int len, CFStringEncoding encoding)
{
QString qs;
if (chs && *chs) {
CFMutableStringRef s = CFStringCreateMutable(kCFAllocatorDefault, 0);
CFStringRef decoderString = CFStringCreateWithBytes (kCFAllocatorDefault, (const UInt8 *)chs, len, encoding, false);
CFStringAppend (s, decoderString);
qs.setBufferFromCFString(s);
CFRelease (s);
CFRelease (decoderString);
if (chs && len > 0) {
CFStringRef s = CFStringCreateWithBytes (kCFAllocatorDefault, (const UInt8 *)chs, len, encoding, false);
if (s) {
qs.setBufferFromCFString(s);
CFRelease(s);
}
}
return qs;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment