Win32::MultiLanguage - Interface to IMultiLanguage I18N routines
use Win32::MultiLanguage; # @@
Win32::MultiLanguage is an experimental wrapper module for the Windows IMultiLanguage interfaces that comes with Internet Explorer version 4 and later. Mlang.dll implements routines for dealing with character encodings, code pages, and locales.
Detects the code page of the given string $octets. An optional $flags parameter may be specified, a combination of MLDETECTCP constants as defined above, if not specified MLDETECTCP_NONE will be used as default. An optional $codepage can also be specified, if this value is set to zero, this API returns all possible encodings. Otherwise, it lists only those encodings related to this parameter. The default is zero.
MLDETECTCP
MLDETECTCP_NONE
It will return a reference to an array of hash references of which each represents a DetectEncodingInfo strucure with the following keys
DetectEncodingInfo
LangID => ..., # primary language identifier CodePage => ..., # detected Win32-defined code page DocPercent => ..., # Percentage in the detected language Confidence => ..., # degree to which the detected data is correct
See http://msdn.microsoft.com/workshop/misc/mlang/reference/structures/detectencodinginfo.asp for details.
...
These are currently not exported/exportable.
Default setting will be used.
Input stream consists of 7-bit data.
Input stream consists of 8-bit data.
Input stream consists of double-byte data.
Input stream is an HTML page.
Code page is meant to display on mail and news clients.
Code page is meant to display on browser clients.
Code page is meant to display in minimal view. This value is generally not used.
Value that indicates that all of the import code pages should be enumerated.
Code page includes encodings for mail and news clients to save a document in.
Code page includes encodings for browser clients to save a document in.
Value that indicates that all of the export code pages should be enumerated.
Value that indicates the encoding requires (or has) a private conversion engine. A client of IEnumCodePage doesn't use this value.
Value that indicates the corresponding encoding is supported on the system.
Value that indicates that only the language support file should be validated. Normally, both the language support file and the supporting font are checked.
Value that indicates the Microsoft® Internet Explorer 4.0 MIME data from MLang's internal data should be used.
Value that indicates that the latest MIME data from MLang's internal data should be used.
Value that indicates that the MIME data stored in the registry should be used.
Not currently supported.
Detection result must be valid for conversion and text rendering.
Detection result must be valid for conversion.
Preserve preferred code page order. This is meaningful only if you have set the @@puiPreferredCodePages parameter in DetectOutboundCodePage.
DetectOutboundCodePage
Only return one of the preferred code pages as the detection result. This is meaningful only if you have set the @@puiPreferredCodePages parameter in DetectOutboundCodePage.
Filter out graphical symbols and punctuation.
Legend: + means is implemented ? means might get implemented - means unlikely that this gets implemented IMultiLanguage + GetCharsetInfo + GetRfc1766FromLcid + IsConvertible + GetRfc1766Info + GetLcidFromRfc1766 + GetFamilyCodePage + GetNumberOfCodePageInfo ? ConvertString ? EnumCodePages ? EnumRfc1766 - ConvertStringToUnicode - ConvertStringFromUnicode - ConvertStringReset - CreateConvertCharset IMultiLanguage2 + GetCodePageInfo + DetectInputCodepage + GetCodePageDescription + GetNumberOfScripts ? EnumScripts - ValidateCodePage - ValidateCodePageEx - IsCodePageInstallable - ConvertStringInIStream - ConvertStringToUnicodeEx - ConvertStringFromUnicodeEx - DetectCodepageInIStream - SetMimeDBSource IMultiLanguage3 + DetectOutboundCodePage - DetectOutboundCodePageInIStream
needs a test suite
needs more checks on input params
could benefit from some typemap entries
creating a new IML instance each time is sub-optimal
what happens if IE4+ is not installed?
needs more documentation
no access to DetectOutboundCodePage wcSpecialChar arg
GetLcidFromRfc1766 could check wantarray
export constants and/or methods
pointers to MSDN for each constant/method
use IMultiLanguage rather than IML2 for IML methods
add proper synopsis
http://msdn.microsoft.com/workshop/misc/mlang/mlang.asp
This is pre-alpha software.
Copyright (c) 2004 Bjoern Hoehrmann <bjoern@hoehrmann.de>. This module is licensed under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Microsoft®'. Assuming CP1252
To install Win32::MultiLanguage, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::MultiLanguage
CPAN shell
perl -MCPAN -e shell install Win32::MultiLanguage
For more information on module installation, please visit the detailed CPAN module installation guide.