|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KCharsets
public class KCharsets
Charset font and encoder/decoder handling. This is needed, because Qt's font matching algorithm gives the font family a higher priority than the charset. For many applications this is not acceptable, since it can totally obscure the output, in languages which use non iso-8859-1 charsets.
Constructor Summary | |
---|---|
|
KCharsets()
Protected constructor. |
protected |
KCharsets(java.lang.Class dummy)
|
Method Summary | |
---|---|
java.util.ArrayList |
availableEncodingNames()
Lists all available encodings as names. |
org.kde.qt.QTextCodec |
codecForName(java.lang.String name)
Provided for compatibility. |
org.kde.qt.QTextCodec |
codecForName(java.lang.String n,
boolean ok)
Tries to find a QTextCodec to convert the given encoding from and to Unicode. |
java.util.ArrayList |
descriptiveEncodingNames()
Lists the available encoding names together with a more descriptive language. |
void |
dispose()
Delete the wrapped C++ instance ahead of finalize() |
java.lang.String |
encodingForName(java.lang.String descriptiveName)
Returns the encoding for a string obtained with descriptiveEncodingNames(). |
protected void |
finalize()
Deletes the wrapped C++ instance |
static char |
fromEntity(java.lang.String str)
Converts an entity to a character. |
static char |
fromEntity(java.lang.String str,
int[] len)
Overloaded member function. |
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
java.lang.String |
languageForEncoding(java.lang.String encoding)
Returns the language the encoding is used for. |
static java.lang.String |
resolveEntities(java.lang.String text)
Scans the given string for entities (like &) and resolves them using fromEntity. |
static java.lang.String |
toEntity(char ch)
Converts a char to an entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected KCharsets(java.lang.Class dummy)
public KCharsets()
Method Detail |
---|
public org.kde.qt.QTextCodec codecForName(java.lang.String name)
name
- the name of the codec
public org.kde.qt.QTextCodec codecForName(java.lang.String n, boolean ok)
ok
will be set to false.
public java.util.ArrayList availableEncodingNames()
public java.util.ArrayList descriptiveEncodingNames()
public java.lang.String languageForEncoding(java.lang.String encoding)
encoding
- the encoding for the language
public java.lang.String encodingForName(java.lang.String descriptiveName)
descriptiveName
- the descriptive name for the encoding
public static char fromEntity(java.lang.String str)
str
- the entity
public static char fromEntity(java.lang.String str, int[] len)
str
- the string containing entifiedlen
- is a return value, that gives the length of the decoded
entity.
public static java.lang.String toEntity(char ch)
ch
- the char to convert
public static java.lang.String resolveEntities(java.lang.String text)
text
- the string containing the entities
protected void finalize() throws java.lang.InternalError
finalize
in class java.lang.Object
java.lang.InternalError
public void dispose()
public boolean isDisposed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |