Lines Matching refs:encoding
225 translator_info* outInfo, uint32 outType, BString& encoding)
234 encoding = textEncoding.GetName();
235 if (encoding.IsEmpty()) {
236 /* No valid character encoding found! */
477 translate_from_text(BPositionIO* source, BString encoding, bool forceEncoding,
527 // determine encoding, if available
529 if (encoding.String() && !forceEncoding) {
531 node->GetAttrInfo("be:encoding", &info);
534 "be:encoding", &encoding) == B_OK)) {
540 ssize_t bytesRead = node->ReadAttr("be:encoding", B_INT32_TYPE, 0,
547 encoding = characterSet->GetName();
553 // we don't write the encoding in this case
556 if (!encoding.IsEmpty())
559 if (!hasAttribute && !encoding.IsEmpty()) {
560 // add encoding attribute, so that someone opening the file can
562 node->WriteAttrString("be:encoding", &encoding);
569 BPrivate::BTextEncoding codec(encoding.String());
581 // default, no encoding
733 BString encoding;
734 return identify_text(buffer, nread, inSource, outInfo, outType, encoding);
781 BString encoding;
782 result = identify_text(buffer, bytesRead, source, &outInfo, outType, encoding);
788 if (ioExtension->FindString("be:encoding", &value) == B_OK
790 // override encoding
791 encoding = value;
796 return translate_from_text(source, encoding, forceEncoding, outDestination, outType);