* Added the file_ascmagic() stuff from our text sniffer add-on (originally taken from

BSD's file utility) to identify text files.
* The translator now automatically decodes files based "be:encoding" (which can now
  also be a string type attribute), as well as whatever file_ascmagic() recognizes.
  IOW we can now finally read all text files we recognize as text files.
* Added an ioExtension to force a specific encoding for Translate() (called "be:encoding"
  as well).
* Enlarged the read buffer to 32768 bytes (instead of just 2048).
* Now fails when reading/writing files >4GB in STXT format (which doesn't support those)
* Translate() now writes the "be:encoding" attribute in case it detected the encoding
  itself.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19842 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-01-17 10:46:28 +00:00
parent 8acdd17f08
commit 471c6cea75
2 changed files with 982 additions and 454 deletions
+5 -1
View File
@@ -2,6 +2,10 @@ SubDir HAIKU_TOP src add-ons translators stxt ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders textencoding ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers registrar ] ;
# for the text identification
# Include BaseTranslator code from shared directory
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons translators shared ] ;
@@ -16,7 +20,7 @@ Translator STXTTranslator :
STXTTranslator.cpp
STXTView.cpp
: be translation
: be translation libtextencoding.so
;
Package haiku-translationkit-cvs :
File diff suppressed because it is too large Load Diff