diff options
Diffstat (limited to 'examples/qwerty')
-rw-r--r-- | examples/qwerty/ANSI_X3.110-1983.map | 511 | ||||
-rw-r--r-- | examples/qwerty/ANSI_X3.110-1983.txt | 7 | ||||
-rw-r--r-- | examples/qwerty/IBM277.map | 350 | ||||
-rw-r--r-- | examples/qwerty/IBM277.txt | 1 | ||||
-rw-r--r-- | examples/qwerty/eucJP.txt | 7 | ||||
-rw-r--r-- | examples/qwerty/koi8.txt | 7 | ||||
-rw-r--r-- | examples/qwerty/latin1.txt | 7 | ||||
-rw-r--r-- | examples/qwerty/main.cpp | 37 | ||||
-rw-r--r-- | examples/qwerty/msunicode.txt | bin | 0 -> 298 bytes | |||
-rw-r--r-- | examples/qwerty/qwerty.cpp | 354 | ||||
-rw-r--r-- | examples/qwerty/qwerty.doc | 27 | ||||
-rw-r--r-- | examples/qwerty/qwerty.h | 58 | ||||
-rw-r--r-- | examples/qwerty/qwerty.pro | 11 | ||||
-rw-r--r-- | examples/qwerty/unicode.txt | bin | 0 -> 208 bytes |
14 files changed, 1377 insertions, 0 deletions
diff --git a/examples/qwerty/ANSI_X3.110-1983.map b/examples/qwerty/ANSI_X3.110-1983.map new file mode 100644 index 0000000..1b7058e --- /dev/null +++ b/examples/qwerty/ANSI_X3.110-1983.map @@ -0,0 +1,511 @@ +<code_set_name> ANSI_X3.110-1983 +<comment_char> % +<escape_char> / +% version: 1.0 +% repertoiremap: mnemonic,ds +% source: ECMA registry + +% alias ISO-IR-99 +% alias CSA_T500-1983 +% alias NAPLPS +CHARMAP +<NU> /x00 <U0000> NULL (NUL) +<SH> /x01 <U0001> START OF HEADING (SOH) +<SX> /x02 <U0002> START OF TEXT (STX) +<EX> /x03 <U0003> END OF TEXT (ETX) +<ET> /x04 <U0004> END OF TRANSMISSION (EOT) +<EQ> /x05 <U0005> ENQUIRY (ENQ) +<AK> /x06 <U0006> ACKNOWLEDGE (ACK) +<BL> /x07 <U0007> BELL (BEL) +<BS> /x08 <U0008> BACKSPACE (BS) +<HT> /x09 <U0009> CHARACTER TABULATION (HT) +<LF> /x0A <U000A> LINE FEED (LF) +<VT> /x0B <U000B> LINE TABULATION (VT) +<FF> /x0C <U000C> FORM FEED (FF) +<CR> /x0D <U000D> CARRIAGE RETURN (CR) +<SO> /x0E <U000E> SHIFT OUT (SO) +<SI> /x0F <U000F> SHIFT IN (SI) +<DL> /x10 <U0010> DATALINK ESCAPE (DLE) +<D1> /x11 <U0011> DEVICE CONTROL ONE (DC1) +<D2> /x12 <U0012> DEVICE CONTROL TWO (DC2) +<D3> /x13 <U0013> DEVICE CONTROL THREE (DC3) +<D4> /x14 <U0014> DEVICE CONTROL FOUR (DC4) +<NK> /x15 <U0015> NEGATIVE ACKNOWLEDGE (NAK) +<SY> /x16 <U0016> SYNCHRONOUS IDLE (SYN) +<EB> /x17 <U0017> END OF TRANSMISSION BLOCK (ETB) +<CN> /x18 <U0018> CANCEL (CAN) +<EM> /x19 <U0019> END OF MEDIUM (EM) +<SB> /x1A <U001A> SUBSTITUTE (SUB) +<EC> /x1B <U001B> ESCAPE (ESC) +<FS> /x1C <U001C> FILE SEPARATOR (IS4) +<GS> /x1D <U001D> GROUP SEPARATOR (IS3) +<RS> /x1E <U001E> RECORD SEPARATOR (IS2) +<US> /x1F <U001F> UNIT SEPARATOR (IS1) +<SP> /x20 <U0020> SPACE +<!> /x21 <U0021> EXCLAMATION MARK +<"> /x22 <U0022> QUOTATION MARK +<%> /x25 <U0025> PERCENT SIGN +<&> /x26 <U0026> AMPERSAND +<'> /x27 <U0027> APOSTROPHE +<(> /x28 <U0028> LEFT PARENTHESIS +<)> /x29 <U0029> RIGHT PARENTHESIS +<*> /x2A <U002A> ASTERISK +<+> /x2B <U002B> PLUS SIGN +<,> /x2C <U002C> COMMA +<-> /x2D <U002D> HYPHEN-MINUS +<.> /x2E <U002E> FULL STOP +<//> /x2F <U002F> SOLIDUS +<0> /x30 <U0030> DIGIT ZERO +<1> /x31 <U0031> DIGIT ONE +<2> /x32 <U0032> DIGIT TWO +<3> /x33 <U0033> DIGIT THREE +<4> /x34 <U0034> DIGIT FOUR +<5> /x35 <U0035> DIGIT FIVE +<6> /x36 <U0036> DIGIT SIX +<7> /x37 <U0037> DIGIT SEVEN +<8> /x38 <U0038> DIGIT EIGHT +<9> /x39 <U0039> DIGIT NINE +<:> /x3A <U003A> COLON +<;> /x3B <U003B> SEMICOLON +<<> /x3C <U003C> LESS-THAN SIGN +<=> /x3D <U003D> EQUALS SIGN +</>> /x3E <U003E> GREATER-THAN SIGN +<?> /x3F <U003F> QUESTION MARK +<At> /x40 <U0040> COMMERCIAL AT +<A> /x41 <U0041> LATIN CAPITAL LETTER A +<B> /x42 <U0042> LATIN CAPITAL LETTER B +<C> /x43 <U0043> LATIN CAPITAL LETTER C +<D> /x44 <U0044> LATIN CAPITAL LETTER D +<E> /x45 <U0045> LATIN CAPITAL LETTER E +<F> /x46 <U0046> LATIN CAPITAL LETTER F +<G> /x47 <U0047> LATIN CAPITAL LETTER G +<H> /x48 <U0048> LATIN CAPITAL LETTER H +<I> /x49 <U0049> LATIN CAPITAL LETTER I +<J> /x4A <U004A> LATIN CAPITAL LETTER J +<K> /x4B <U004B> LATIN CAPITAL LETTER K +<L> /x4C <U004C> LATIN CAPITAL LETTER L +<M> /x4D <U004D> LATIN CAPITAL LETTER M +<N> /x4E <U004E> LATIN CAPITAL LETTER N +<O> /x4F <U004F> LATIN CAPITAL LETTER O +<P> /x50 <U0050> LATIN CAPITAL LETTER P +<Q> /x51 <U0051> LATIN CAPITAL LETTER Q +<R> /x52 <U0052> LATIN CAPITAL LETTER R +<S> /x53 <U0053> LATIN CAPITAL LETTER S +<T> /x54 <U0054> LATIN CAPITAL LETTER T +<U> /x55 <U0055> LATIN CAPITAL LETTER U +<V> /x56 <U0056> LATIN CAPITAL LETTER V +<W> /x57 <U0057> LATIN CAPITAL LETTER W +<X> /x58 <U0058> LATIN CAPITAL LETTER X +<Y> /x59 <U0059> LATIN CAPITAL LETTER Y +<Z> /x5A <U005A> LATIN CAPITAL LETTER Z +<<(> /x5B <U005B> LEFT SQUARE BRACKET +<////> /x5C <U005C> REVERSE SOLIDUS +<)/>> /x5D <U005D> RIGHT SQUARE BRACKET +<'/>> /x5E <U005E> CIRCUMFLEX ACCENT +<_> /x5F <U005F> LOW LINE +<'!> /x60 <U0060> GRAVE ACCENT +<a> /x61 <U0061> LATIN SMALL LETTER A +<b> /x62 <U0062> LATIN SMALL LETTER B +<c> /x63 <U0063> LATIN SMALL LETTER C +<d> /x64 <U0064> LATIN SMALL LETTER D +<e> /x65 <U0065> LATIN SMALL LETTER E +<f> /x66 <U0066> LATIN SMALL LETTER F +<g> /x67 <U0067> LATIN SMALL LETTER G +<h> /x68 <U0068> LATIN SMALL LETTER H +<i> /x69 <U0069> LATIN SMALL LETTER I +<j> /x6A <U006A> LATIN SMALL LETTER J +<k> /x6B <U006B> LATIN SMALL LETTER K +<l> /x6C <U006C> LATIN SMALL LETTER L +<m> /x6D <U006D> LATIN SMALL LETTER M +<n> /x6E <U006E> LATIN SMALL LETTER N +<o> /x6F <U006F> LATIN SMALL LETTER O +<p> /x70 <U0070> LATIN SMALL LETTER P +<q> /x71 <U0071> LATIN SMALL LETTER Q +<r> /x72 <U0072> LATIN SMALL LETTER R +<s> /x73 <U0073> LATIN SMALL LETTER S +<t> /x74 <U0074> LATIN SMALL LETTER T +<u> /x75 <U0075> LATIN SMALL LETTER U +<v> /x76 <U0076> LATIN SMALL LETTER V +<w> /x77 <U0077> LATIN SMALL LETTER W +<x> /x78 <U0078> LATIN SMALL LETTER X +<y> /x79 <U0079> LATIN SMALL LETTER Y +<z> /x7A <U007A> LATIN SMALL LETTER Z +<(!> /x7B <U007B> LEFT CURLY BRACKET +<!!> /x7C <U007C> VERTICAL LINE +<!)> /x7D <U007D> RIGHT CURLY BRACKET +<'?> /x7E <U007E> TILDE +<DT> /x7F <U007F> DELETE (DEL) +<PA> /x80 <U0080> PADDING CHARACTER (PAD) +<HO> /x81 <U0081> HIGH OCTET PRESET (HOP) +<BH> /x82 <U0082> BREAK PERMITTED HERE (BPH) +<NH> /x83 <U0083> NO BREAK HERE (NBH) +<IN> /x84 <U0084> INDEX (IND) +<NL> /x85 <U0085> NEXT LINE (NEL) +<SA> /x86 <U0086> START OF SELECTED AREA (SSA) +<ES> /x87 <U0087> END OF SELECTED AREA (ESA) +<HS> /x88 <U0088> CHARACTER TABULATION SET (HTS) +<HJ> /x89 <U0089> CHARACTER TABULATION WITH JUSTIFICATION (HTJ) +<VS> /x8A <U008A> LINE TABULATION SET (VTS) +<PD> /x8B <U008B> PARTIAL LINE FORWARD (PLD) +<PU> /x8C <U008C> PARTIAL LINE BACKWARD (PLU) +<RI> /x8D <U008D> REVERSE LINE FEED (RI) +<S2> /x8E <U008E> SINGLE-SHIFT TWO (SS2) +<S3> /x8F <U008F> SINGLE-SHIFT THREE (SS3) +<DC> /x90 <U0090> DEVICE CONTROL STRING (DCS) +<P1> /x91 <U0091> PRIVATE USE ONE (PU1) +<P2> /x92 <U0092> PRIVATE USE TWO (PU2) +<TS> /x93 <U0093> SET TRANSMIT STATE (STS) +<CC> /x94 <U0094> CANCEL CHARACTER (CCH) +<MW> /x95 <U0095> MESSAGE WAITING (MW) +<SG> /x96 <U0096> START OF GUARDED AREA (SPA) +<EG> /x97 <U0097> END OF GUARDED AREA (EPA) +<SS> /x98 <U0098> START OF STRING (SOS) +<GC> /x99 <U0099> SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI) +<SC> /x9A <U009A> SINGLE CHARACTER INTRODUCER (SCI) +<CI> /x9B <U009B> CONTROL SEQUENCE INTRODUCER (CSI) +<ST> /x9C <U009C> STRING TERMINATOR (ST) +<OC> /x9D <U009D> OPERATING SYSTEM COMMAND (OSC) +<PM> /x9E <U009E> PRIVACY MESSAGE (PM) +<AC> /x9F <U009F> APPLICATION PROGRAM COMMAND (APC) +<!I> /xA1 <U00A1> INVERTED EXCLAMATION MARK +<Ct> /xA2 <U00A2> CENT SIGN +<Pd> /xA3 <U00A3> POUND SIGN +<DO> /xA4 <U0024> DOLLAR SIGN +<Ye> /xA5 <U00A5> YEN SIGN +<Nb> /xA6 <U0023> NUMBER SIGN +<SE> /xA7 <U00A7> SECTION SIGN +<Cu> /xA8 <U00A4> CURRENCY SIGN +<'6> /xA9 <U2018> LEFT SINGLE QUOTATION MARK +<"6> /xAA <U201C> LEFT DOUBLE QUOTATION MARK +<<<> /xAB <U00AB> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +<<-> /xAC <U2190> LEFTWARDS ARROW +<-!> /xAD <U2191> UPWARDS ARROW +<-/>> /xAE <U2192> RIGHTWARDS ARROW +<-v> /xAF <U2193> DOWNWARDS ARROW +<DG> /xB0 <U00B0> DEGREE SIGN +<+-> /xB1 <U00B1> PLUS-MINUS SIGN +<2S> /xB2 <U00B2> SUPERSCRIPT TWO +<3S> /xB3 <U00B3> SUPERSCRIPT THREE +<*X> /xB4 <U00D7> MULTIPLICATION SIGN +<My> /xB5 <U00B5> MICRO SIGN +<PI> /xB6 <U00B6> PILCROW SIGN +<.M> /xB7 <U00B7> MIDDLE DOT +<-:> /xB8 <U00F7> DIVISION SIGN +<'9> /xB9 <U2019> RIGHT SINGLE QUOTATION MARK +<"9> /xBA <U201D> RIGHT DOUBLE QUOTATION MARK +</>/>> /xBB <U00BB> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +<14> /xBC <U00BC> VULGAR FRACTION ONE QUARTER +<12> /xBD <U00BD> VULGAR FRACTION ONE HALF +<34> /xBE <U00BE> VULGAR FRACTION THREE QUARTERS +<?I> /xBF <U00BF> INVERTED QUESTION MARK +<"!> /xC1 <UE002> NON-SPACING GRAVE ACCENT <ISO-IR-103_C1> (not a real character) +<"'> /xC2 <UE003> NON-SPACING ACUTE ACCENT <ISO-IR-103_C2> (not a real character) +<"/>> /xC3 <UE004> NON-SPACING CIRCUMFLEX ACCENT <ISO-IR-103_C3> (not a real character) +<"?> /xC4 <UE005> NON-SPACING TILDE <ISO-IR-103_C4> (not a real character) +<"-> /xC5 <UE006> NON-SPACING MACRON <ISO-IR-103_C5> (not a real character) +<"(> /xC6 <UE007> NON-SPACING BREVE <ISO-IR-103_C6> (not a real character) +<".> /xC7 <UE008> NON-SPACING DOT ABOVE <ISO-IR-103_C7> (not a real character) +<":> /xC8 <UE009> NON-SPACING DIAERESIS <ISO-IR-103_C8> (not a real character) +<"//> /xC9 <UE011> NON-SPACING LONG SOLIDUS OVERLAY <ISO-IR-128_C9> (not a real character) +<"0> /xCA <UE00A> NON-SPACING RING ABOVE <ISO-IR-103_CA> (not a real character) +<",> /xCB <UE00B> NON-SPACING CEDILLA <ISO-IR-103_CB> (not a real character) +<"_> /xCC <UE00C> NON-SPACING LOW LINE <ISO-IR-103_CC> (not a real character) +<""> /xCD <UE00D> NON-SPACING DOUBLE ACCUTE ACCENT <ISO-IR-103_CD> (not a real character) +<";> /xCE <UE00E> NON-SPACING OGONEK <ISO-IR-103_CE> (not a real character) +<"<> /xCF <UE00F> NON-SPACING CARON <ISO-IR-103_CF> (not a real character) +<-M> /xD0 <U2014> EM DASH +<1S> /xD1 <U00B9> SUPERSCRIPT ONE +<Rg> /xD2 <U00AE> REGISTERED SIGN +<Co> /xD3 <U00A9> COPYRIGHT SIGN +<TM> /xD4 <U2122> TRADE MARK SIGN +<M8> /xD5 <U266A> EIGHTH NOTE +<hh> /xD6 <U2500> BOX DRAWINGS LIGHT HORIZONTAL +<vv> /xD7 <U2502> BOX DRAWINGS LIGHT VERTICAL +<FD> /xD8 <U2571> BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT +<BD> /xD9 <U2572> BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT +<Fd> /xDA <U25E2> BLACK LOWER RIGHT TRIANGLE +<Bd> /xDB <U25E3> BLACK LOWER LEFT TRIANGLE +<18> /xDC <U215B> VULGAR FRACTION ONE EIGHTH +<38> /xDD <U215C> VULGAR FRACTION THREE EIGHTHS +<58> /xDE <U215D> VULGAR FRACTION FIVE EIGHTHS +<78> /xDF <U215E> VULGAR FRACTION SEVEN EIGHTHS +<Om> /xE0 <U2126> OHM SIGN +<AE> /xE1 <U00C6> LATIN CAPITAL LETTER AE +<D-> /xE2 <U00D0> LATIN CAPITAL LETTER ETH (Icelandic) +<-a> /xE3 <U00AA> FEMININE ORDINAL INDICATOR +<H//> /xE4 <U0126> LATIN CAPITAL LETTER H WITH STROKE +<vh> /xE5 <U253C> BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL +<IJ> /xE6 <U0132> LATIN CAPITAL LIGATURE IJ +<L.> /xE7 <U013F> LATIN CAPITAL LETTER L WITH MIDDLE DOT +<L//> /xE8 <U0141> LATIN CAPITAL LETTER L WITH STROKE +<O//> /xE9 <U00D8> LATIN CAPITAL LETTER O WITH STROKE +<OE> /xEA <U0152> LATIN CAPITAL LIGATURE OE +<-o> /xEB <U00BA> MASCULINE ORDINAL INDICATOR +<TH> /xEC <U00DE> LATIN CAPITAL LETTER THORN (Icelandic) +<T//> /xED <U0166> LATIN CAPITAL LETTER T WITH STROKE +<NG> /xEE <U014A> LATIN CAPITAL LETTER ENG (Sami) +<'n> /xEF <U0149> LATIN SMALL LETTER N PRECEDED BY APOSTROPHE +<kk> /xF0 <U0138> LATIN SMALL LETTER KRA (Greenlandic) +<ae> /xF1 <U00E6> LATIN SMALL LETTER AE +<d//> /xF2 <U0111> LATIN SMALL LETTER D WITH STROKE +<d-> /xF3 <U00F0> LATIN SMALL LETTER ETH (Icelandic) +<h//> /xF4 <U0127> LATIN SMALL LETTER H WITH STROKE +<i.> /xF5 <U0131> LATIN SMALL LETTER DOTLESS I +<ij> /xF6 <U0133> LATIN SMALL LIGATURE IJ +<l.> /xF7 <U0140> LATIN SMALL LETTER L WITH MIDDLE DOT +<l//> /xF8 <U0142> LATIN SMALL LETTER L WITH STROKE +<o//> /xF9 <U00F8> LATIN SMALL LETTER O WITH STROKE +<oe> /xFA <U0153> LATIN SMALL LIGATURE OE +<ss> /xFB <U00DF> LATIN SMALL LETTER SHARP S (German) +<th> /xFC <U00FE> LATIN SMALL LETTER THORN (Icelandic) +<t//> /xFD <U0167> LATIN SMALL LETTER T WITH STROKE +<ng> /xFE <U014B> LATIN SMALL LETTER ENG (Sami) +<''> /xC2/x20 <U00B4> ACUTE ACCENT +<a'> /xC2/x61 <U00E1> LATIN SMALL LETTER A WITH ACUTE +<A'> /xC2/x41 <U00C1> LATIN CAPITAL LETTER A WITH ACUTE +<e'> /xC2/x65 <U00E9> LATIN SMALL LETTER E WITH ACUTE +<E'> /xC2/x45 <U00C9> LATIN CAPITAL LETTER E WITH ACUTE +<i'> /xC2/x69 <U00ED> LATIN SMALL LETTER I WITH ACUTE +<I'> /xC2/x49 <U00CD> LATIN CAPITAL LETTER I WITH ACUTE +<o'> /xC2/x6F <U00F3> LATIN SMALL LETTER O WITH ACUTE +<O'> /xC2/x4F <U00D3> LATIN CAPITAL LETTER O WITH ACUTE +<u'> /xC2/x75 <U00FA> LATIN SMALL LETTER U WITH ACUTE +<U'> /xC2/x55 <U00DA> LATIN CAPITAL LETTER U WITH ACUTE +<y'> /xC2/x79 <U00FD> LATIN SMALL LETTER Y WITH ACUTE +<Y'> /xC2/x59 <U00DD> LATIN CAPITAL LETTER Y WITH ACUTE +<c'> /xC2/x63 <U0107> LATIN SMALL LETTER C WITH ACUTE +<C'> /xC2/x43 <U0106> LATIN CAPITAL LETTER C WITH ACUTE +<l'> /xC2/x6C <U013A> LATIN SMALL LETTER L WITH ACUTE +<L'> /xC2/x4C <U0139> LATIN CAPITAL LETTER L WITH ACUTE +<n'> /xC2/x6E <U0144> LATIN SMALL LETTER N WITH ACUTE +<N'> /xC2/x4E <U0143> LATIN CAPITAL LETTER N WITH ACUTE +<r'> /xC2/x72 <U0155> LATIN SMALL LETTER R WITH ACUTE +<R'> /xC2/x52 <U0154> LATIN CAPITAL LETTER R WITH ACUTE +<s'> /xC2/x73 <U015B> LATIN SMALL LETTER S WITH ACUTE +<S'> /xC2/x53 <U015A> LATIN CAPITAL LETTER S WITH ACUTE +<z'> /xC2/x7A <U017A> LATIN SMALL LETTER Z WITH ACUTE +<Z'> /xC2/x5A <U0179> LATIN CAPITAL LETTER Z WITH ACUTE +<'(> /xC6/x20 <U02D8> BREVE +<a(> /xC6/x61 <U0103> LATIN SMALL LETTER A WITH BREVE +<A(> /xC6/x41 <U0102> LATIN CAPITAL LETTER A WITH BREVE +<g(> /xC6/x67 <U011F> LATIN SMALL LETTER G WITH BREVE +<G(> /xC6/x47 <U011E> LATIN CAPITAL LETTER G WITH BREVE +<u(> /xC6/x75 <U016D> LATIN SMALL LETTER U WITH BREVE +<U(> /xC6/x55 <U016C> LATIN CAPITAL LETTER U WITH BREVE +<'<> /xCF/x20 <U02C7> CARON (Mandarin Chinese third tone) +<c<> /xCF/x63 <U010D> LATIN SMALL LETTER C WITH CARON +<C<> /xCF/x43 <U010C> LATIN CAPITAL LETTER C WITH CARON +<d<> /xCF/x64 <U010F> LATIN SMALL LETTER D WITH CARON +<D<> /xCF/x44 <U010E> LATIN CAPITAL LETTER D WITH CARON +<e<> /xCF/x65 <U011B> LATIN SMALL LETTER E WITH CARON +<E<> /xCF/x45 <U011A> LATIN CAPITAL LETTER E WITH CARON +<l<> /xCF/x6C <U013E> LATIN SMALL LETTER L WITH CARON +<L<> /xCF/x4C <U013D> LATIN CAPITAL LETTER L WITH CARON +<n<> /xCF/x6E <U0148> LATIN SMALL LETTER N WITH CARON +<N<> /xCF/x4E <U0147> LATIN CAPITAL LETTER N WITH CARON +<r<> /xCF/x72 <U0159> LATIN SMALL LETTER R WITH CARON +<R<> /xCF/x52 <U0158> LATIN CAPITAL LETTER R WITH CARON +<s<> /xCF/x73 <U0161> LATIN SMALL LETTER S WITH CARON +<S<> /xCF/x53 <U0160> LATIN CAPITAL LETTER S WITH CARON +<t<> /xCF/x74 <U0165> LATIN SMALL LETTER T WITH CARON +<T<> /xCF/x54 <U0164> LATIN CAPITAL LETTER T WITH CARON +<z<> /xCF/x7A <U017E> LATIN SMALL LETTER Z WITH CARON +<Z<> /xCF/x5A <U017D> LATIN CAPITAL LETTER Z WITH CARON +<',> /xCB/x20 <U00B8> CEDILLA +<c,> /xCB/x63 <U00E7> LATIN SMALL LETTER C WITH CEDILLA +<C,> /xCB/x43 <U00C7> LATIN CAPITAL LETTER C WITH CEDILLA +<g,> /xCB/x67 <U0123> LATIN SMALL LETTER G WITH CEDILLA +<G,> /xCB/x47 <U0122> LATIN CAPITAL LETTER G WITH CEDILLA +<k,> /xCB/x6B <U0137> LATIN SMALL LETTER K WITH CEDILLA +<K,> /xCB/x4B <U0136> LATIN CAPITAL LETTER K WITH CEDILLA +<l,> /xCB/x6C <U013C> LATIN SMALL LETTER L WITH CEDILLA +<L,> /xCB/x4C <U013B> LATIN CAPITAL LETTER L WITH CEDILLA +<n,> /xCB/x6E <U0146> LATIN SMALL LETTER N WITH CEDILLA +<N,> /xCB/x4E <U0145> LATIN CAPITAL LETTER N WITH CEDILLA +<r,> /xCB/x72 <U0157> LATIN SMALL LETTER R WITH CEDILLA +<R,> /xCB/x52 <U0156> LATIN CAPITAL LETTER R WITH CEDILLA +<s,> /xCB/x73 <U015F> LATIN SMALL LETTER S WITH CEDILLA +<S,> /xCB/x53 <U015E> LATIN CAPITAL LETTER S WITH CEDILLA +<t,> /xCB/x74 <U0163> LATIN SMALL LETTER T WITH CEDILLA +<T,> /xCB/x54 <U0162> LATIN CAPITAL LETTER T WITH CEDILLA +<a/>> /xC3/x61 <U00E2> LATIN SMALL LETTER A WITH CIRCUMFLEX +<A/>> /xC3/x41 <U00C2> LATIN CAPITAL LETTER A WITH CIRCUMFLEX +<e/>> /xC3/x65 <U00EA> LATIN SMALL LETTER E WITH CIRCUMFLEX +<E/>> /xC3/x45 <U00CA> LATIN CAPITAL LETTER E WITH CIRCUMFLEX +<i/>> /xC3/x69 <U00EE> LATIN SMALL LETTER I WITH CIRCUMFLEX +<I/>> /xC3/x49 <U00CE> LATIN CAPITAL LETTER I WITH CIRCUMFLEX +<o/>> /xC3/x6F <U00F4> LATIN SMALL LETTER O WITH CIRCUMFLEX +<O/>> /xC3/x4F <U00D4> LATIN CAPITAL LETTER O WITH CIRCUMFLEX +<u/>> /xC3/x75 <U00FB> LATIN SMALL LETTER U WITH CIRCUMFLEX +<U/>> /xC3/x55 <U00DB> LATIN CAPITAL LETTER U WITH CIRCUMFLEX +<y/>> /xC3/x79 <U0177> LATIN SMALL LETTER Y WITH CIRCUMFLEX +<Y/>> /xC3/x59 <U0176> LATIN CAPITAL LETTER Y WITH CIRCUMFLEX +<c/>> /xC3/x63 <U0109> LATIN SMALL LETTER C WITH CIRCUMFLEX +<C/>> /xC3/x43 <U0108> LATIN CAPITAL LETTER C WITH CIRCUMFLEX +<g/>> /xC3/x67 <U011D> LATIN SMALL LETTER G WITH CIRCUMFLEX +<G/>> /xC3/x47 <U011C> LATIN CAPITAL LETTER G WITH CIRCUMFLEX +<h/>> /xC3/x68 <U0125> LATIN SMALL LETTER H WITH CIRCUMFLEX +<H/>> /xC3/x48 <U0124> LATIN CAPITAL LETTER H WITH CIRCUMFLEX +<j/>> /xC3/x6A <U0135> LATIN SMALL LETTER J WITH CIRCUMFLEX +<J/>> /xC3/x4A <U0134> LATIN CAPITAL LETTER J WITH CIRCUMFLEX +<s/>> /xC3/x73 <U015D> LATIN SMALL LETTER S WITH CIRCUMFLEX +<S/>> /xC3/x53 <U015C> LATIN CAPITAL LETTER S WITH CIRCUMFLEX +<w/>> /xC3/x77 <U0175> LATIN SMALL LETTER W WITH CIRCUMFLEX +<W/>> /xC3/x57 <U0174> LATIN CAPITAL LETTER W WITH CIRCUMFLEX +<':> /xC8/x20 <U00A8> DIAERESIS +<a:> /xC8/x61 <U00E4> LATIN SMALL LETTER A WITH DIAERESIS +<A:> /xC8/x41 <U00C4> LATIN CAPITAL LETTER A WITH DIAERESIS +<e:> /xC8/x65 <U00EB> LATIN SMALL LETTER E WITH DIAERESIS +<E:> /xC8/x45 <U00CB> LATIN CAPITAL LETTER E WITH DIAERESIS +<i:> /xC8/x69 <U00EF> LATIN SMALL LETTER I WITH DIAERESIS +<I:> /xC8/x49 <U00CF> LATIN CAPITAL LETTER I WITH DIAERESIS +<o:> /xC8/x6F <U00F6> LATIN SMALL LETTER O WITH DIAERESIS +<O:> /xC8/x4F <U00D6> LATIN CAPITAL LETTER O WITH DIAERESIS +<u:> /xC8/x75 <U00FC> LATIN SMALL LETTER U WITH DIAERESIS +<U:> /xC8/x55 <U00DC> LATIN CAPITAL LETTER U WITH DIAERESIS +<y:> /xC8/x79 <U00FF> LATIN SMALL LETTER Y WITH DIAERESIS +<Y:> /xC8/x59 <U0178> LATIN CAPITAL LETTER Y WITH DIAERESIS +<'.> /xC7/x20 <U02D9> DOT ABOVE (Mandarin Chinese light tone) +<c.> /xC7/x63 <U010B> LATIN SMALL LETTER C WITH DOT ABOVE +<C.> /xC7/x43 <U010A> LATIN CAPITAL LETTER C WITH DOT ABOVE +<e.> /xC7/x65 <U0117> LATIN SMALL LETTER E WITH DOT ABOVE +<E.> /xC7/x45 <U0116> LATIN CAPITAL LETTER E WITH DOT ABOVE +<g.> /xC7/x67 <U0121> LATIN SMALL LETTER G WITH DOT ABOVE +<G.> /xC7/x47 <U0120> LATIN CAPITAL LETTER G WITH DOT ABOVE +<I.> /xC7/x49 <U0130> LATIN CAPITAL LETTER I WITH DOT ABOVE +<z.> /xC7/x7A <U017C> LATIN SMALL LETTER Z WITH DOT ABOVE +<Z.> /xC7/x5A <U017B> LATIN CAPITAL LETTER Z WITH DOT ABOVE +<'"> /xCD/x20 <U02DD> DOUBLE ACUTE ACCENT +<o"> /xCD/x6F <U0151> LATIN SMALL LETTER O WITH DOUBLE ACUTE +<O"> /xCD/x4F <U0150> LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +<u"> /xCD/x75 <U0171> LATIN SMALL LETTER U WITH DOUBLE ACUTE +<U"> /xCD/x55 <U0170> LATIN CAPITAL LETTER U WITH DOUBLE ACUTE +<a!> /xC1/x61 <U00E0> LATIN SMALL LETTER A WITH GRAVE +<A!> /xC1/x41 <U00C0> LATIN CAPITAL LETTER A WITH GRAVE +<e!> /xC1/x65 <U00E8> LATIN SMALL LETTER E WITH GRAVE +<E!> /xC1/x45 <U00C8> LATIN CAPITAL LETTER E WITH GRAVE +<i!> /xC1/x69 <U00EC> LATIN SMALL LETTER I WITH GRAVE +<I!> /xC1/x49 <U00CC> LATIN CAPITAL LETTER I WITH GRAVE +<o!> /xC1/x6F <U00F2> LATIN SMALL LETTER O WITH GRAVE +<O!> /xC1/x4F <U00D2> LATIN CAPITAL LETTER O WITH GRAVE +<u!> /xC1/x75 <U00F9> LATIN SMALL LETTER U WITH GRAVE +<U!> /xC1/x55 <U00D9> LATIN CAPITAL LETTER U WITH GRAVE +<'m> /xC5/x20 <U00AF> MACRON +<a-> /xC5/x61 <U0101> LATIN SMALL LETTER A WITH MACRON +<A-> /xC5/x41 <U0100> LATIN CAPITAL LETTER A WITH MACRON +<e-> /xC5/x65 <U0113> LATIN SMALL LETTER E WITH MACRON +<E-> /xC5/x45 <U0112> LATIN CAPITAL LETTER E WITH MACRON +<i-> /xC5/x69 <U012B> LATIN SMALL LETTER I WITH MACRON +<I-> /xC5/x49 <U012A> LATIN CAPITAL LETTER I WITH MACRON +<o-> /xC5/x6F <U014D> LATIN SMALL LETTER O WITH MACRON +<O-> /xC5/x4F <U014C> LATIN CAPITAL LETTER O WITH MACRON +<u-> /xC5/x75 <U016B> LATIN SMALL LETTER U WITH MACRON +<U-> /xC5/x55 <U016A> LATIN CAPITAL LETTER U WITH MACRON +<';> /xCE/x20 <U02DB> OGONEK +<a;> /xCE/x61 <U0105> LATIN SMALL LETTER A WITH OGONEK +<A;> /xCE/x41 <U0104> LATIN CAPITAL LETTER A WITH OGONEK +<e;> /xCE/x65 <U0119> LATIN SMALL LETTER E WITH OGONEK +<E;> /xCE/x45 <U0118> LATIN CAPITAL LETTER E WITH OGONEK +<i;> /xCE/x69 <U012F> LATIN SMALL LETTER I WITH OGONEK +<I;> /xCE/x49 <U012E> LATIN CAPITAL LETTER I WITH OGONEK +<u;> /xCE/x75 <U0173> LATIN SMALL LETTER U WITH OGONEK +<U;> /xCE/x55 <U0172> LATIN CAPITAL LETTER U WITH OGONEK +<'0> /xCA/x20 <U02DA> RING ABOVE +<aa> /xCA/x61 <U00E5> LATIN SMALL LETTER A WITH RING ABOVE +<AA> /xCA/x41 <U00C5> LATIN CAPITAL LETTER A WITH RING ABOVE +<u0> /xCA/x75 <U016F> LATIN SMALL LETTER U WITH RING ABOVE +<U0> /xCA/x55 <U016E> LATIN CAPITAL LETTER U WITH RING ABOVE +<a?> /xC4/x61 <U00E3> LATIN SMALL LETTER A WITH TILDE +<A?> /xC4/x41 <U00C3> LATIN CAPITAL LETTER A WITH TILDE +<n?> /xC4/x6E <U00F1> LATIN SMALL LETTER N WITH TILDE +<N?> /xC4/x4E <U00D1> LATIN CAPITAL LETTER N WITH TILDE +<i?> /xC4/x69 <U0129> LATIN SMALL LETTER I WITH TILDE +<I?> /xC4/x49 <U0128> LATIN CAPITAL LETTER I WITH TILDE +<o?> /xC4/x6F <U00F5> LATIN SMALL LETTER O WITH TILDE +<O?> /xC4/x4F <U00D5> LATIN CAPITAL LETTER O WITH TILDE +<u?> /xC4/x75 <U0169> LATIN SMALL LETTER U WITH TILDE +<U?> /xC4/x55 <U0168> LATIN CAPITAL LETTER U WITH TILDE +<NUL> /x00 <U0000> NUL +<SOH> /x01 <U0001> START OF HEADING (SOH) +<STX> /x02 <U0002> START OF TEXT (STX) +<ETX> /x03 <U0003> END OF TEXT (ETX) +<EOT> /x04 <U0004> END OF TRANSMISSION (EOT) +<ENQ> /x05 <U0005> ENQUIRY (ENQ) +<ACK> /x06 <U0006> ACKNOWLEDGE (ACK) +<alert> /x07 <U0007> BELL (BEL) +<BEL> /x07 <U0007> BELL (BEL) +<backspace> /x08 <U0008> BACKSPACE (BS) +<tab> /x09 <U0009> CHARACTER TABULATION (HT) +<newline> /x0A <U000A> LINE FEED (LF) +<vertical-tab> /x0B <U000B> LINE TABULATION (VT) +<form-feed> /x0C <U000C> FORM FEED (FF) +<carriage-return> /x0D <U000D> CARRIAGE RETURN (CR) +<DLE> /x10 <U0010> DATALINK ESCAPE (DLE) +<DC1> /x11 <U0011> DEVICE CONTROL ONE (DC1) +<DC2> /x12 <U0012> DEVICE CONTROL TWO (DC2) +<DC3> /x13 <U0013> DEVICE CONTROL THREE (DC3) +<DC4> /x14 <U0014> DEVICE CONTROL FOUR (DC4) +<NAK> /x15 <U0015> NEGATIVE ACKNOWLEDGE (NAK) +<SYN> /x16 <U0016> SYNCHRONOUS IDLE (SYN) +<ETB> /x17 <U0017> END OF TRANSMISSION BLOCK (ETB) +<CAN> /x18 <U0018> CANCEL (CAN) +<SUB> /x1A <U001A> SUBSTITUTE (SUB) +<ESC> /x1B <U001B> ESCAPE (ESC) +<IS4> /x1C <U001C> FILE SEPARATOR (IS4) +<IS3> /x1D <U001D> GROUP SEPARATOR (IS3) +<intro> /x1D <U001D> GROUP SEPARATOR (IS3) +<IS2> /x1E <U001E> RECORD SEPARATOR (IS2) +<IS1> /x1F <U001F> UNIT SEPARATOR (IS1) +<DEL> /x7F <U007F> DELETE (DEL) +<space> /x20 <U0020> SPACE +<exclamation-mark> /x21 <U0021> EXCLAMATION MARK +<quotation-mark> /x22 <U0022> QUOTATION MARK +<number-sign> /xA6 <U0023> NUMBER SIGN +<dollar-sign> /xA4 <U0024> DOLLAR SIGN +<percent-sign> /x25 <U0025> PERCENT SIGN +<ampersand> /x26 <U0026> AMPERSAND +<apostrophe> /x27 <U0027> APOSTROPHE +<left-parenthesis> /x28 <U0028> LEFT PARENTHESIS +<right-parenthesis> /x29 <U0029> RIGHT PARENTHESIS +<asterisk> /x2A <U002A> ASTERISK +<plus-sign> /x2B <U002B> PLUS SIGN +<comma> /x2C <U002C> COMMA +<hyphen> /x2D <U002D> HYPHEN-MINUS +<hyphen-minus> /x2D <U002D> HYPHEN-MINUS +<period> /x2E <U002E> FULL STOP +<full-stop> /x2E <U002E> FULL STOP +<slash> /x2F <U002F> SOLIDUS +<solidus> /x2F <U002F> SOLIDUS +<zero> /x30 <U0030> DIGIT ZERO +<one> /x31 <U0031> DIGIT ONE +<two> /x32 <U0032> DIGIT TWO +<three> /x33 <U0033> DIGIT THREE +<four> /x34 <U0034> DIGIT FOUR +<five> /x35 <U0035> DIGIT FIVE +<six> /x36 <U0036> DIGIT SIX +<seven> /x37 <U0037> DIGIT SEVEN +<eight> /x38 <U0038> DIGIT EIGHT +<nine> /x39 <U0039> DIGIT NINE +<colon> /x3A <U003A> COLON +<semicolon> /x3B <U003B> SEMICOLON +<less-than-sign> /x3C <U003C> LESS-THAN SIGN +<equals-sign> /x3D <U003D> EQUALS SIGN +<greater-than-sign> /x3E <U003E> GREATER-THAN SIGN +<question-mark> /x3F <U003F> QUESTION MARK +<commercial-at> /x40 <U0040> COMMERCIAL AT +<left-square-bracket> /x5B <U005B> LEFT SQUARE BRACKET +<backslash> /x5C <U005C> REVERSE SOLIDUS +<reverse-solidus> /x5C <U005C> REVERSE SOLIDUS +<right-square-bracket> /x5D <U005D> RIGHT SQUARE BRACKET +<circumflex> /x5E <U005E> CIRCUMFLEX ACCENT +<circumflex-accent> /x5E <U005E> CIRCUMFLEX ACCENT +<underscore> /x5F <U005F> LOW LINE +<low-line> /x5F <U005F> LOW LINE +<grave-accent> /x60 <U0060> GRAVE ACCENT +<left-brace> /x7B <U007B> LEFT CURLY BRACKET +<left-curly-bracket> /x7B <U007B> LEFT CURLY BRACKET +<vertical-line> /x7C <U007C> VERTICAL LINE +<right-brace> /x7D <U007D> RIGHT CURLY BRACKET +<right-curly-bracket> /x7D <U007D> RIGHT CURLY BRACKET +<tilde> /x7E <U007E> TILDE +END CHARMAP diff --git a/examples/qwerty/ANSI_X3.110-1983.txt b/examples/qwerty/ANSI_X3.110-1983.txt new file mode 100644 index 0000000..eab6308 --- /dev/null +++ b/examples/qwerty/ANSI_X3.110-1983.txt @@ -0,0 +1,7 @@ +ABCDE
+ÂaÃaÄaÈaÊañËcÁeÂeÃeÈeÁiÂiÃiÈióÄnÁoÂoÃoÄoÈoùÁuÂa
+?????
+?????
+?????
+??????
+??????
\ No newline at end of file diff --git a/examples/qwerty/IBM277.map b/examples/qwerty/IBM277.map new file mode 100644 index 0000000..51a2472 --- /dev/null +++ b/examples/qwerty/IBM277.map @@ -0,0 +1,350 @@ +<code_set_name> IBM277 +<comment_char> % +<escape_char> / +% version: 1.0 +% repertoiremap: mnemonic,ds +% source: IBM NLS RM Vol2 SE09-8002-01, March 1990 + +% alias EBCDIC-CP-DK +% alias EBCDIC-CP-NO +CHARMAP +<NU> /x00 <U0000> NULL (NUL) +<SH> /x01 <U0001> START OF HEADING (SOH) +<SX> /x02 <U0002> START OF TEXT (STX) +<EX> /x03 <U0003> END OF TEXT (ETX) +<ST> /x04 <U009C> STRING TERMINATOR (ST) +<HT> /x05 <U0009> CHARACTER TABULATION (HT) +<SA> /x06 <U0086> START OF SELECTED AREA (SSA) +<DT> /x07 <U007F> DELETE (DEL) +<EG> /x08 <U0097> END OF GUARDED AREA (EPA) +<RI> /x09 <U008D> REVERSE LINE FEED (RI) +<S2> /x0A <U008E> SINGLE-SHIFT TWO (SS2) +<VT> /x0B <U000B> LINE TABULATION (VT) +<FF> /x0C <U000C> FORM FEED (FF) +<CR> /x0D <U000D> CARRIAGE RETURN (CR) +<SO> /x0E <U000E> SHIFT OUT (SO) +<SI> /x0F <U000F> SHIFT IN (SI) +<DL> /x10 <U0010> DATALINK ESCAPE (DLE) +<D1> /x11 <U0011> DEVICE CONTROL ONE (DC1) +<D2> /x12 <U0012> DEVICE CONTROL TWO (DC2) +<D3> /x13 <U0013> DEVICE CONTROL THREE (DC3) +<OC> /x14 <U009D> OPERATING SYSTEM COMMAND (OSC) +<NL> /x15 <U0085> NEXT LINE (NEL) +<BS> /x16 <U0008> BACKSPACE (BS) +<ES> /x17 <U0087> END OF SELECTED AREA (ESA) +<CN> /x18 <U0018> CANCEL (CAN) +<EM> /x19 <U0019> END OF MEDIUM (EM) +<P2> /x1A <U0092> PRIVATE USE TWO (PU2) +<S3> /x1B <U008F> SINGLE-SHIFT THREE (SS3) +<FS> /x1C <U001C> FILE SEPARATOR (IS4) +<GS> /x1D <U001D> GROUP SEPARATOR (IS3) +<RS> /x1E <U001E> RECORD SEPARATOR (IS2) +<US> /x1F <U001F> UNIT SEPARATOR (IS1) +<PA> /x20 <U0080> PADDING CHARACTER (PAD) +<HO> /x21 <U0081> HIGH OCTET PRESET (HOP) +<BH> /x22 <U0082> BREAK PERMITTED HERE (BPH) +<NH> /x23 <U0083> NO BREAK HERE (NBH) +<IN> /x24 <U0084> INDEX (IND) +<LF> /x25 <U000A> LINE FEED (LF) +<EB> /x26 <U0017> END OF TRANSMISSION BLOCK (ETB) +<EC> /x27 <U001B> ESCAPE (ESC) +<HS> /x28 <U0088> CHARACTER TABULATION SET (HTS) +<HJ> /x29 <U0089> CHARACTER TABULATION WITH JUSTIFICATION (HTJ) +<VS> /x2A <U008A> LINE TABULATION SET (VTS) +<PD> /x2B <U008B> PARTIAL LINE FORWARD (PLD) +<PU> /x2C <U008C> PARTIAL LINE BACKWARD (PLU) +<EQ> /x2D <U0005> ENQUIRY (ENQ) +<AK> /x2E <U0006> ACKNOWLEDGE (ACK) +<BL> /x2F <U0007> BELL (BEL) +<DC> /x30 <U0090> DEVICE CONTROL STRING (DCS) +<P1> /x31 <U0091> PRIVATE USE ONE (PU1) +<SY> /x32 <U0016> SYNCHRONOUS IDLE (SYN) +<TS> /x33 <U0093> SET TRANSMIT STATE (STS) +<CC> /x34 <U0094> CANCEL CHARACTER (CCH) +<MW> /x35 <U0095> MESSAGE WAITING (MW) +<SG> /x36 <U0096> START OF GUARDED AREA (SPA) +<ET> /x37 <U0004> END OF TRANSMISSION (EOT) +<SS> /x38 <U0098> START OF STRING (SOS) +<GC> /x39 <U0099> SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI) +<SC> /x3A <U009A> SINGLE CHARACTER INTRODUCER (SCI) +<CI> /x3B <U009B> CONTROL SEQUENCE INTRODUCER (CSI) +<D4> /x3C <U0014> DEVICE CONTROL FOUR (DC4) +<NK> /x3D <U0015> NEGATIVE ACKNOWLEDGE (NAK) +<PM> /x3E <U009E> PRIVACY MESSAGE (PM) +<SB> /x3F <U001A> SUBSTITUTE (SUB) +<SP> /x40 <U0020> SPACE +<NS> /x41 <U00A0> NO-BREAK SPACE +<a/>> /x42 <U00E2> LATIN SMALL LETTER A WITH CIRCUMFLEX +<a:> /x43 <U00E4> LATIN SMALL LETTER A WITH DIAERESIS +<a!> /x44 <U00E0> LATIN SMALL LETTER A WITH GRAVE +<a'> /x45 <U00E1> LATIN SMALL LETTER A WITH ACUTE +<a?> /x46 <U00E3> LATIN SMALL LETTER A WITH TILDE +<!)> /x47 <U007D> RIGHT CURLY BRACKET +<c,> /x48 <U00E7> LATIN SMALL LETTER C WITH CEDILLA +<n?> /x49 <U00F1> LATIN SMALL LETTER N WITH TILDE +<Nb> /x4A <U0023> NUMBER SIGN +<.> /x4B <U002E> FULL STOP +<<> /x4C <U003C> LESS-THAN SIGN +<(> /x4D <U0028> LEFT PARENTHESIS +<+> /x4E <U002B> PLUS SIGN +<!> /x4F <U0021> EXCLAMATION MARK +<&> /x50 <U0026> AMPERSAND +<e'> /x51 <U00E9> LATIN SMALL LETTER E WITH ACUTE +<e/>> /x52 <U00EA> LATIN SMALL LETTER E WITH CIRCUMFLEX +<e:> /x53 <U00EB> LATIN SMALL LETTER E WITH DIAERESIS +<e!> /x54 <U00E8> LATIN SMALL LETTER E WITH GRAVE +<i'> /x55 <U00ED> LATIN SMALL LETTER I WITH ACUTE +<i/>> /x56 <U00EE> LATIN SMALL LETTER I WITH CIRCUMFLEX +<i:> /x57 <U00EF> LATIN SMALL LETTER I WITH DIAERESIS +<i!> /x58 <U00EC> LATIN SMALL LETTER I WITH GRAVE +<ss> /x59 <U00DF> LATIN SMALL LETTER SHARP S (German) +<Cu> /x5A <U00A4> CURRENCY SIGN +<AA> /x5B <U00C5> LATIN CAPITAL LETTER A WITH RING ABOVE +<*> /x5C <U002A> ASTERISK +<)> /x5D <U0029> RIGHT PARENTHESIS +<;> /x5E <U003B> SEMICOLON +<'/>> /x5F <U005E> CIRCUMFLEX ACCENT +<-> /x60 <U002D> HYPHEN-MINUS +<//> /x61 <U002F> SOLIDUS +<A/>> /x62 <U00C2> LATIN CAPITAL LETTER A WITH CIRCUMFLEX +<A:> /x63 <U00C4> LATIN CAPITAL LETTER A WITH DIAERESIS +<A!> /x64 <U00C0> LATIN CAPITAL LETTER A WITH GRAVE +<A'> /x65 <U00C1> LATIN CAPITAL LETTER A WITH ACUTE +<A?> /x66 <U00C3> LATIN CAPITAL LETTER A WITH TILDE +<DO> /x67 <U0024> DOLLAR SIGN +<C,> /x68 <U00C7> LATIN CAPITAL LETTER C WITH CEDILLA +<N?> /x69 <U00D1> LATIN CAPITAL LETTER N WITH TILDE +<o//> /x6A <U00F8> LATIN SMALL LETTER O WITH STROKE +<,> /x6B <U002C> COMMA +<%> /x6C <U0025> PERCENT SIGN +<_> /x6D <U005F> LOW LINE +</>> /x6E <U003E> GREATER-THAN SIGN +<?> /x6F <U003F> QUESTION MARK +<BB> /x70 <U00A6> BROKEN BAR +<E'> /x71 <U00C9> LATIN CAPITAL LETTER E WITH ACUTE +<E/>> /x72 <U00CA> LATIN CAPITAL LETTER E WITH CIRCUMFLEX +<E:> /x73 <U00CB> LATIN CAPITAL LETTER E WITH DIAERESIS +<E!> /x74 <U00C8> LATIN CAPITAL LETTER E WITH GRAVE +<I'> /x75 <U00CD> LATIN CAPITAL LETTER I WITH ACUTE +<I/>> /x76 <U00CE> LATIN CAPITAL LETTER I WITH CIRCUMFLEX +<I:> /x77 <U00CF> LATIN CAPITAL LETTER I WITH DIAERESIS +<I!> /x78 <U00CC> LATIN CAPITAL LETTER I WITH GRAVE +<'!> /x79 <U0060> GRAVE ACCENT +<:> /x7A <U003A> COLON +<AE> /x7B <U00C6> LATIN CAPITAL LETTER AE +<O//> /x7C <U00D8> LATIN CAPITAL LETTER O WITH STROKE +<'> /x7D <U0027> APOSTROPHE +<=> /x7E <U003D> EQUALS SIGN +<"> /x7F <U0022> QUOTATION MARK +<At> /x80 <U0040> COMMERCIAL AT +<a> /x81 <U0061> LATIN SMALL LETTER A +<b> /x82 <U0062> LATIN SMALL LETTER B +<c> /x83 <U0063> LATIN SMALL LETTER C +<d> /x84 <U0064> LATIN SMALL LETTER D +<e> /x85 <U0065> LATIN SMALL LETTER E +<f> /x86 <U0066> LATIN SMALL LETTER F +<g> /x87 <U0067> LATIN SMALL LETTER G +<h> /x88 <U0068> LATIN SMALL LETTER H +<i> /x89 <U0069> LATIN SMALL LETTER I +<<<> /x8A <U00AB> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +</>/>> /x8B <U00BB> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +<d-> /x8C <U00F0> LATIN SMALL LETTER ETH (Icelandic) +<y'> /x8D <U00FD> LATIN SMALL LETTER Y WITH ACUTE +<th> /x8E <U00FE> LATIN SMALL LETTER THORN (Icelandic) +<+-> /x8F <U00B1> PLUS-MINUS SIGN +<DG> /x90 <U00B0> DEGREE SIGN +<j> /x91 <U006A> LATIN SMALL LETTER J +<k> /x92 <U006B> LATIN SMALL LETTER K +<l> /x93 <U006C> LATIN SMALL LETTER L +<m> /x94 <U006D> LATIN SMALL LETTER M +<n> /x95 <U006E> LATIN SMALL LETTER N +<o> /x96 <U006F> LATIN SMALL LETTER O +<p> /x97 <U0070> LATIN SMALL LETTER P +<q> /x98 <U0071> LATIN SMALL LETTER Q +<r> /x99 <U0072> LATIN SMALL LETTER R +<-a> /x9A <U00AA> FEMININE ORDINAL INDICATOR +<-o> /x9B <U00BA> MASCULINE ORDINAL INDICATOR +<(!> /x9C <U007B> LEFT CURLY BRACKET +<',> /x9D <U00B8> CEDILLA +<<(> /x9E <U005B> LEFT SQUARE BRACKET +<)/>> /x9F <U005D> RIGHT SQUARE BRACKET +<My> /xA0 <U00B5> MICRO SIGN +<u:> /xA1 <U00FC> LATIN SMALL LETTER U WITH DIAERESIS +<s> /xA2 <U0073> LATIN SMALL LETTER S +<t> /xA3 <U0074> LATIN SMALL LETTER T +<u> /xA4 <U0075> LATIN SMALL LETTER U +<v> /xA5 <U0076> LATIN SMALL LETTER V +<w> /xA6 <U0077> LATIN SMALL LETTER W +<x> /xA7 <U0078> LATIN SMALL LETTER X +<y> /xA8 <U0079> LATIN SMALL LETTER Y +<z> /xA9 <U007A> LATIN SMALL LETTER Z +<!I> /xAA <U00A1> INVERTED EXCLAMATION MARK +<?I> /xAB <U00BF> INVERTED QUESTION MARK +<D-> /xAC <U00D0> LATIN CAPITAL LETTER ETH (Icelandic) +<Y'> /xAD <U00DD> LATIN CAPITAL LETTER Y WITH ACUTE +<TH> /xAE <U00DE> LATIN CAPITAL LETTER THORN (Icelandic) +<Rg> /xAF <U00AE> REGISTERED SIGN +<Ct> /xB0 <U00A2> CENT SIGN +<Pd> /xB1 <U00A3> POUND SIGN +<Ye> /xB2 <U00A5> YEN SIGN +<.M> /xB3 <U00B7> MIDDLE DOT +<Co> /xB4 <U00A9> COPYRIGHT SIGN +<SE> /xB5 <U00A7> SECTION SIGN +<PI> /xB6 <U00B6> PILCROW SIGN +<14> /xB7 <U00BC> VULGAR FRACTION ONE QUARTER +<12> /xB8 <U00BD> VULGAR FRACTION ONE HALF +<34> /xB9 <U00BE> VULGAR FRACTION THREE QUARTERS +<NO> /xBA <U00AC> NOT SIGN +<!!> /xBB <U007C> VERTICAL LINE +<'-> /xBC <U203E> OVERLINE +<':> /xBD <U00A8> DIAERESIS +<''> /xBE <U00B4> ACUTE ACCENT +<*X> /xBF <U00D7> MULTIPLICATION SIGN +<ae> /xC0 <U00E6> LATIN SMALL LETTER AE +<A> /xC1 <U0041> LATIN CAPITAL LETTER A +<B> /xC2 <U0042> LATIN CAPITAL LETTER B +<C> /xC3 <U0043> LATIN CAPITAL LETTER C +<D> /xC4 <U0044> LATIN CAPITAL LETTER D +<E> /xC5 <U0045> LATIN CAPITAL LETTER E +<F> /xC6 <U0046> LATIN CAPITAL LETTER F +<G> /xC7 <U0047> LATIN CAPITAL LETTER G +<H> /xC8 <U0048> LATIN CAPITAL LETTER H +<I> /xC9 <U0049> LATIN CAPITAL LETTER I +<--> /xCA <U00AD> SOFT HYPHEN +<o/>> /xCB <U00F4> LATIN SMALL LETTER O WITH CIRCUMFLEX +<o:> /xCC <U00F6> LATIN SMALL LETTER O WITH DIAERESIS +<o!> /xCD <U00F2> LATIN SMALL LETTER O WITH GRAVE +<o'> /xCE <U00F3> LATIN SMALL LETTER O WITH ACUTE +<o?> /xCF <U00F5> LATIN SMALL LETTER O WITH TILDE +<aa> /xD0 <U00E5> LATIN SMALL LETTER A WITH RING ABOVE +<J> /xD1 <U004A> LATIN CAPITAL LETTER J +<K> /xD2 <U004B> LATIN CAPITAL LETTER K +<L> /xD3 <U004C> LATIN CAPITAL LETTER L +<M> /xD4 <U004D> LATIN CAPITAL LETTER M +<N> /xD5 <U004E> LATIN CAPITAL LETTER N +<O> /xD6 <U004F> LATIN CAPITAL LETTER O +<P> /xD7 <U0050> LATIN CAPITAL LETTER P +<Q> /xD8 <U0051> LATIN CAPITAL LETTER Q +<R> /xD9 <U0052> LATIN CAPITAL LETTER R +<1S> /xDA <U00B9> SUPERSCRIPT ONE +<u/>> /xDB <U00FB> LATIN SMALL LETTER U WITH CIRCUMFLEX +<'?> /xDC <U007E> TILDE +<u!> /xDD <U00F9> LATIN SMALL LETTER U WITH GRAVE +<u'> /xDE <U00FA> LATIN SMALL LETTER U WITH ACUTE +<y:> /xDF <U00FF> LATIN SMALL LETTER Y WITH DIAERESIS +<////> /xE0 <U005C> REVERSE SOLIDUS +<-:> /xE1 <U00F7> DIVISION SIGN +<S> /xE2 <U0053> LATIN CAPITAL LETTER S +<T> /xE3 <U0054> LATIN CAPITAL LETTER T +<U> /xE4 <U0055> LATIN CAPITAL LETTER U +<V> /xE5 <U0056> LATIN CAPITAL LETTER V +<W> /xE6 <U0057> LATIN CAPITAL LETTER W +<X> /xE7 <U0058> LATIN CAPITAL LETTER X +<Y> /xE8 <U0059> LATIN CAPITAL LETTER Y +<Z> /xE9 <U005A> LATIN CAPITAL LETTER Z +<2S> /xEA <U00B2> SUPERSCRIPT TWO +<O/>> /xEB <U00D4> LATIN CAPITAL LETTER O WITH CIRCUMFLEX +<O:> /xEC <U00D6> LATIN CAPITAL LETTER O WITH DIAERESIS +<O!> /xED <U00D2> LATIN CAPITAL LETTER O WITH GRAVE +<O'> /xEE <U00D3> LATIN CAPITAL LETTER O WITH ACUTE +<O?> /xEF <U00D5> LATIN CAPITAL LETTER O WITH TILDE +<0> /xF0 <U0030> DIGIT ZERO +<1> /xF1 <U0031> DIGIT ONE +<2> /xF2 <U0032> DIGIT TWO +<3> /xF3 <U0033> DIGIT THREE +<4> /xF4 <U0034> DIGIT FOUR +<5> /xF5 <U0035> DIGIT FIVE +<6> /xF6 <U0036> DIGIT SIX +<7> /xF7 <U0037> DIGIT SEVEN +<8> /xF8 <U0038> DIGIT EIGHT +<9> /xF9 <U0039> DIGIT NINE +<3S> /xFA <U00B3> SUPERSCRIPT THREE +<U/>> /xFB <U00DB> LATIN CAPITAL LETTER U WITH CIRCUMFLEX +<U:> /xFC <U00DC> LATIN CAPITAL LETTER U WITH DIAERESIS +<U!> /xFD <U00D9> LATIN CAPITAL LETTER U WITH GRAVE +<U'> /xFE <U00DA> LATIN CAPITAL LETTER U WITH ACUTE +<AC> /xFF <U009F> APPLICATION PROGRAM COMMAND (APC) +<NUL> /x00 <U0000> NUL +<SOH> /x01 <U0001> START OF HEADING (SOH) +<STX> /x02 <U0002> START OF TEXT (STX) +<ETX> /x03 <U0003> END OF TEXT (ETX) +<EOT> /x37 <U0004> END OF TRANSMISSION (EOT) +<ENQ> /x2D <U0005> ENQUIRY (ENQ) +<ACK> /x2E <U0006> ACKNOWLEDGE (ACK) +<alert> /x2F <U0007> BELL (BEL) +<BEL> /x2F <U0007> BELL (BEL) +<backspace> /x16 <U0008> BACKSPACE (BS) +<tab> /x05 <U0009> CHARACTER TABULATION (HT) +<newline> /x25 <U000A> LINE FEED (LF) +<vertical-tab> /x0B <U000B> LINE TABULATION (VT) +<form-feed> /x0C <U000C> FORM FEED (FF) +<carriage-return> /x0D <U000D> CARRIAGE RETURN (CR) +<DLE> /x10 <U0010> DATALINK ESCAPE (DLE) +<DC1> /x11 <U0011> DEVICE CONTROL ONE (DC1) +<DC2> /x12 <U0012> DEVICE CONTROL TWO (DC2) +<DC3> /x13 <U0013> DEVICE CONTROL THREE (DC3) +<DC4> /x3C <U0014> DEVICE CONTROL FOUR (DC4) +<NAK> /x3D <U0015> NEGATIVE ACKNOWLEDGE (NAK) +<SYN> /x32 <U0016> SYNCHRONOUS IDLE (SYN) +<ETB> /x26 <U0017> END OF TRANSMISSION BLOCK (ETB) +<CAN> /x18 <U0018> CANCEL (CAN) +<SUB> /x3F <U001A> SUBSTITUTE (SUB) +<ESC> /x27 <U001B> ESCAPE (ESC) +<IS4> /x1C <U001C> FILE SEPARATOR (IS4) +<IS3> /x1D <U001D> GROUP SEPARATOR (IS3) +<intro> /x1D <U001D> GROUP SEPARATOR (IS3) +<IS2> /x1E <U001E> RECORD SEPARATOR (IS2) +<IS1> /x1F <U001F> UNIT SEPARATOR (IS1) +<DEL> /x07 <U007F> DELETE (DEL) +<space> /x40 <U0020> SPACE +<exclamation-mark> /x4F <U0021> EXCLAMATION MARK +<quotation-mark> /x7F <U0022> QUOTATION MARK +<number-sign> /x4A <U0023> NUMBER SIGN +<dollar-sign> /x67 <U0024> DOLLAR SIGN +<percent-sign> /x6C <U0025> PERCENT SIGN +<ampersand> /x50 <U0026> AMPERSAND +<apostrophe> /x7D <U0027> APOSTROPHE +<left-parenthesis> /x4D <U0028> LEFT PARENTHESIS +<right-parenthesis> /x5D <U0029> RIGHT PARENTHESIS +<asterisk> /x5C <U002A> ASTERISK +<plus-sign> /x4E <U002B> PLUS SIGN +<comma> /x6B <U002C> COMMA +<hyphen> /x60 <U002D> HYPHEN-MINUS +<hyphen-minus> /x60 <U002D> HYPHEN-MINUS +<period> /x4B <U002E> FULL STOP +<full-stop> /x4B <U002E> FULL STOP +<slash> /x61 <U002F> SOLIDUS +<solidus> /x61 <U002F> SOLIDUS +<zero> /xF0 <U0030> DIGIT ZERO +<one> /xF1 <U0031> DIGIT ONE +<two> /xF2 <U0032> DIGIT TWO +<three> /xF3 <U0033> DIGIT THREE +<four> /xF4 <U0034> DIGIT FOUR +<five> /xF5 <U0035> DIGIT FIVE +<six> /xF6 <U0036> DIGIT SIX +<seven> /xF7 <U0037> DIGIT SEVEN +<eight> /xF8 <U0038> DIGIT EIGHT +<nine> /xF9 <U0039> DIGIT NINE +<colon> /x7A <U003A> COLON +<semicolon> /x5E <U003B> SEMICOLON +<less-than-sign> /x4C <U003C> LESS-THAN SIGN +<equals-sign> /x7E <U003D> EQUALS SIGN +<greater-than-sign> /x6E <U003E> GREATER-THAN SIGN +<question-mark> /x6F <U003F> QUESTION MARK +<commercial-at> /x80 <U0040> COMMERCIAL AT +<left-square-bracket> /x9E <U005B> LEFT SQUARE BRACKET +<backslash> /xE0 <U005C> REVERSE SOLIDUS +<reverse-solidus> /xE0 <U005C> REVERSE SOLIDUS +<right-square-bracket> /x9F <U005D> RIGHT SQUARE BRACKET +<circumflex> /x5F <U005E> CIRCUMFLEX ACCENT +<circumflex-accent> /x5F <U005E> CIRCUMFLEX ACCENT +<underscore> /x6D <U005F> LOW LINE +<low-line> /x6D <U005F> LOW LINE +<grave-accent> /x79 <U0060> GRAVE ACCENT +<left-brace> /x9C <U007B> LEFT CURLY BRACKET +<left-curly-bracket> /x9C <U007B> LEFT CURLY BRACKET +<vertical-line> /xBB <U007C> VERTICAL LINE +<right-brace> /x47 <U007D> RIGHT CURLY BRACKET +<right-curly-bracket> /x47 <U007D> RIGHT CURLY BRACKET +<tilde> /xDC <U007E> TILDE +END CHARMAP diff --git a/examples/qwerty/IBM277.txt b/examples/qwerty/IBM277.txt new file mode 100644 index 0000000..e0d659c --- /dev/null +++ b/examples/qwerty/IBM277.txt @@ -0,0 +1 @@ +ÁÂÃÄÅ
%EBFCÐÀHTQRSXUVWŒIÍÎËÏÌjÝE
%?????
%?????
%?????
%??????
%??????
\ No newline at end of file diff --git a/examples/qwerty/eucJP.txt b/examples/qwerty/eucJP.txt new file mode 100644 index 0000000..f7a8672 --- /dev/null +++ b/examples/qwerty/eucJP.txt @@ -0,0 +1,7 @@ +ABCDE
+¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢
+¤¢¤¤¤¦¤¨¤ª
+¤«¤¤¯¤±¤³
+¤µ¤·¤¹¤»¤½
+§«§¸§µ§¬§¦§¯
+§Û§è§å§Ü§Ö§ß
\ No newline at end of file diff --git a/examples/qwerty/koi8.txt b/examples/qwerty/koi8.txt new file mode 100644 index 0000000..8d08046 --- /dev/null +++ b/examples/qwerty/koi8.txt @@ -0,0 +1,7 @@ +ABCDE
+¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
+¤¤¤¤¤
+¤¤¤¤¤
+¤¤¤¤¤
+êãõëåî
+ÊÃÕËÅÎ
\ No newline at end of file diff --git a/examples/qwerty/latin1.txt b/examples/qwerty/latin1.txt new file mode 100644 index 0000000..14ddc25 --- /dev/null +++ b/examples/qwerty/latin1.txt @@ -0,0 +1,7 @@ +ABCDE
+áâãäåæçèéêëìíîïðñòóôõöøùá
+?????
+?????
+?????
+??????
+??????
\ No newline at end of file diff --git a/examples/qwerty/main.cpp b/examples/qwerty/main.cpp new file mode 100644 index 0000000..7162ee1 --- /dev/null +++ b/examples/qwerty/main.cpp @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for Qt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#include <qapplication.h> +#include "qwerty.h" + + +int main( int argc, char **argv ) +{ + QApplication a( argc, argv ); + + + bool isSmall = qApp->desktop()->size().width() < 450 + || qApp->desktop()->size().height() < 450; + + int i; + for ( i= argc <= 1 ? 0 : 1; i<argc; i++ ) { + Editor *e = new Editor; + e->setCaption("Qt Example - QWERTY"); + if ( i > 0 ) + e->load( argv[i] ); + if ( isSmall ) { + e->showMaximized(); + } else { + e->resize( 400, 400 ); + e->show(); + } + } + a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) ); + return a.exec(); +} diff --git a/examples/qwerty/msunicode.txt b/examples/qwerty/msunicode.txt Binary files differnew file mode 100644 index 0000000..a707a76 --- /dev/null +++ b/examples/qwerty/msunicode.txt diff --git a/examples/qwerty/qwerty.cpp b/examples/qwerty/qwerty.cpp new file mode 100644 index 0000000..14bdd8b --- /dev/null +++ b/examples/qwerty/qwerty.cpp @@ -0,0 +1,354 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for Qt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#include "qwerty.h" +#include <qapplication.h> +#include <qfile.h> +#include <qfiledialog.h> +#include <qpopupmenu.h> +#include <qtextstream.h> +#include <qpainter.h> +#include <qmessagebox.h> +#include <qpaintdevicemetrics.h> +#include <qptrlist.h> +#include <qfontdialog.h> + +#include <qtextcodec.h> + +const bool no_writing = FALSE; + +static QPtrList<QTextCodec> *codecList = 0; + +enum { Uni = 0, MBug = 1, Lat1 = 2, Local = 3, Guess = 4, Codec = 5 }; + + +Editor::Editor( QWidget * parent , const char * name ) + : QWidget( parent, name, WDestructiveClose ) +{ + m = new QMenuBar( this, "menu" ); + + QPopupMenu * file = new QPopupMenu(); + Q_CHECK_PTR( file ); + m->insertItem( "&File", file ); + + file->insertItem( "&New", this, SLOT(newDoc()), ALT+Key_N ); + file->insertItem( "&Open...", this, SLOT(load()), ALT+Key_O ); + file->insertItem( "&Save...", this, SLOT(save()), ALT+Key_S ); + file->insertSeparator(); + open_as = new QPopupMenu(); + file->insertItem( "Open &As", open_as ); + save_as = new QPopupMenu(); + file->insertItem( "Sa&ve As", save_as ); + file->insertItem( "Add &Encoding", this, SLOT(addEncoding()) ); +#ifndef QT_NO_PRINTER + file->insertSeparator(); + file->insertItem( "&Print...", this, SLOT(print()), ALT+Key_P ); +#endif + file->insertSeparator(); + file->insertItem( "&Close", this, SLOT(close()),ALT+Key_W ); + file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), ALT+Key_Q ); + + connect( save_as, SIGNAL(activated(int)), this, SLOT(saveAsEncoding(int)) ); + connect( open_as, SIGNAL(activated(int)), this, SLOT(openAsEncoding(int)) ); + rebuildCodecList(); + + QPopupMenu * edit = new QPopupMenu(); + Q_CHECK_PTR( edit ); + m->insertItem( "&Edit", edit ); + + edit->insertItem( "To &Uppercase", this, SLOT(toUpper()), ALT+Key_U ); + edit->insertItem( "To &Lowercase", this, SLOT(toLower()), ALT+Key_L ); +#ifndef QT_NO_FONTDIALOG + edit->insertSeparator(); + edit->insertItem( "&Select Font" , this, SLOT(font()), ALT+Key_T ); +#endif + changed = FALSE; + e = new QMultiLineEdit( this, "editor" ); + connect( e, SIGNAL( textChanged() ), this, SLOT( textChanged() ) ); + + // We use Unifont - if you have it installed you'll see all + // Unicode character glyphs. + // + // Unifont only comes in one pixel size, so we cannot let + // it change pixel size as the display DPI changes. + // + QFont unifont("unifont",16,50); unifont.setPixelSize(16); + e->setFont( unifont ); + + e->setFocus(); +} + +Editor::~Editor() +{ +} + +void Editor::font() +{ +#ifndef QT_NO_FONTDIALOG + bool ok; + QFont f = QFontDialog::getFont( &ok, e->font() ); + if ( ok ) { + e->setFont( f ); + } +#endif +} + + + +void Editor::rebuildCodecList() +{ + delete codecList; + codecList = new QPtrList<QTextCodec>; + QTextCodec *codec; + int i; + for (i = 0; (codec = QTextCodec::codecForIndex(i)); i++) + codecList->append( codec ); + int n = codecList->count(); + for (int pm=0; pm<2; pm++) { + QPopupMenu* menu = pm ? open_as : save_as; + menu->clear(); + QString local = "Local ("; + local += QTextCodec::codecForLocale()->name(); + local += ")"; + menu->insertItem( local, Local ); + menu->insertItem( "Unicode", Uni ); + menu->insertItem( "Latin1", Lat1 ); + menu->insertItem( "Microsoft Unicode", MBug ); + if ( pm ) + menu->insertItem( "[guess]", Guess ); + for ( i = 0; i < n; i++ ) + menu->insertItem( codecList->at(i)->name(), Codec + i ); + } +} + +void Editor::newDoc() +{ + Editor *ed = new Editor; + if ( qApp->desktop()->size().width() < 450 + || qApp->desktop()->size().height() < 450 ) { + ed->showMaximized(); + } else { + ed->resize( 400, 400 ); + ed->show(); + } +} + + +void Editor::load() +{ +#ifndef QT_NO_FILEDIALOG + QString fn = QFileDialog::getOpenFileName( QString::null, QString::null, this ); + if ( !fn.isEmpty() ) + load( fn, -1 ); +#endif +} + +void Editor::load( const QString& fileName, int code ) +{ + QFile f( fileName ); + if ( !f.open( IO_ReadOnly ) ) + return; + + e->setAutoUpdate( FALSE ); + + QTextStream t(&f); + if ( code >= Codec ) + t.setCodec( codecList->at(code-Codec) ); + else if ( code == Uni ) + t.setEncoding( QTextStream::Unicode ); + else if ( code == MBug ) + t.setEncoding( QTextStream::UnicodeReverse ); + else if ( code == Lat1 ) + t.setEncoding( QTextStream::Latin1 ); + else if ( code == Guess ) { + QFile f(fileName); + f.open(IO_ReadOnly); + char buffer[256]; + int l = 256; + l=f.readBlock(buffer,l); + QTextCodec* codec = QTextCodec::codecForContent(buffer, l); + if ( codec ) { + QMessageBox::information(this,"Encoding",QString("Codec: ")+codec->name()); + t.setCodec( codec ); + } + } + e->setText( t.read() ); + f.close(); + + e->setAutoUpdate( TRUE ); + e->repaint(); + setCaption( fileName ); + + changed = FALSE; +} + +void Editor::openAsEncoding( int code ) +{ +#ifndef QT_NO_FILEDIALOG + //storing filename (proper save) is left as an exercise... + QString fn = QFileDialog::getOpenFileName( QString::null, QString::null, this ); + if ( !fn.isEmpty() ) + (void) load( fn, code ); +#endif +} + +bool Editor::save() +{ +#ifndef QT_NO_FILEDIALOG + //storing filename (proper save) is left as an exercise... + QString fn = QFileDialog::getSaveFileName( QString::null, QString::null, this ); + if ( !fn.isEmpty() ) + return saveAs( fn ); + return FALSE; +#endif +} + +void Editor::saveAsEncoding( int code ) +{ +#ifndef QT_NO_FILEDIALOG + //storing filename (proper save) is left as an exercise... + QString fn = QFileDialog::getSaveFileName( QString::null, QString::null, this ); + if ( !fn.isEmpty() ) + (void) saveAs( fn, code ); +#endif +} + +void Editor::addEncoding() +{ +#ifndef QT_NO_FILEDIALOG + QString fn = QFileDialog::getOpenFileName( QString::null, "*.map", this ); + if ( !fn.isEmpty() ) { + QFile f(fn); + if (f.open(IO_ReadOnly)) { + if (QTextCodec::loadCharmap(&f)) { + rebuildCodecList(); + } else { + QMessageBox::warning(0,"Charmap error", + "The file did not contain a valid charmap.\n\n" + "A charmap file should look like this:\n" + " <code_set_name> thename\n" + " <escape_char> /\n" + " % alias thealias\n" + " CHARMAP\n" + " <tokenname> /x12 <U3456>\n" + " <tokenname> /xAB/x12 <U0023>\n" + " ...\n" + " END CHARMAP\n" + ); + } + } + } +#endif +} + + +bool Editor::saveAs( const QString& fileName, int code ) +{ + QFile f( fileName ); + if ( no_writing || !f.open( IO_WriteOnly ) ) { + QMessageBox::warning(this,"I/O Error", + QString("The file could not be opened.\n\n") + +fileName); + return FALSE; + } + QTextStream t(&f); + if ( code >= Codec ) + t.setCodec( codecList->at(code-Codec) ); + else if ( code == Uni ) + t.setEncoding( QTextStream::Unicode ); + else if ( code == MBug ) + t.setEncoding( QTextStream::UnicodeReverse ); + else if ( code == Lat1 ) + t.setEncoding( QTextStream::Latin1 ); + t << e->text(); + f.close(); + setCaption( fileName ); + changed = FALSE; + return TRUE; +} + +void Editor::print() +{ +#ifndef QT_NO_PRINTER + if ( printer.setup(this) ) { // opens printer dialog + printer.setFullPage(TRUE); // we'll set our own margins + QPainter p; + p.begin( &printer ); // paint on printer + p.setFont( e->font() ); + QFontMetrics fm = p.fontMetrics(); + QPaintDeviceMetrics metrics( &printer ); // need width/height + // of printer surface + const int MARGIN = metrics.logicalDpiX() / 2; // half-inch margin + int yPos = MARGIN; // y position for each line + + for( int i = 0 ; i < e->numLines() ; i++ ) { + if ( printer.aborted() ) + break; + if ( yPos + fm.lineSpacing() > metrics.height() - MARGIN ) { + // no more room on this page + if ( !printer.newPage() ) // start new page + break; // some error + yPos = MARGIN; // back to top of page + } + p.drawText( MARGIN, yPos, metrics.width() - 2*MARGIN, + fm.lineSpacing(), ExpandTabs, e->textLine( i ) ); + yPos += fm.lineSpacing(); + } + p.end(); // send job to printer + } +#endif +} + +void Editor::resizeEvent( QResizeEvent * ) +{ + if ( e && m ) + e->setGeometry( 0, m->height(), width(), height() - m->height() ); +} + +void Editor::closeEvent( QCloseEvent *event ) +{ + event->accept(); + + if ( changed ) { // the text has been changed + switch ( QMessageBox::warning( this, "Qwerty", + "Save changes to Document?", + tr("&Yes"), + tr("&No"), + tr("Cancel"), + 0, 2) ) { + case 0: // yes + if ( save() ) + event->accept(); + else + event->ignore(); + break; + case 1: // no + event->accept(); + break; + default: // cancel + event->ignore(); + break; + } + } +} + +void Editor::toUpper() +{ + e->setText(e->text().upper()); +} + +void Editor::toLower() +{ + e->setText(e->text().lower()); +} + +void Editor::textChanged() +{ + changed = TRUE; +} diff --git a/examples/qwerty/qwerty.doc b/examples/qwerty/qwerty.doc new file mode 100644 index 0000000..51a1feb --- /dev/null +++ b/examples/qwerty/qwerty.doc @@ -0,0 +1,27 @@ +/* +*/ +/*! \page qwerty-example.html + + \ingroup examples + \title Simple editor that can load encodings + + + <hr> + + Header file: + + \include qwerty/qwerty.h + + <hr> + + Implementation: + + \include qwerty/qwerty.cpp + + <hr> + + Main: + + \include qwerty/main.cpp +*/ + diff --git a/examples/qwerty/qwerty.h b/examples/qwerty/qwerty.h new file mode 100644 index 0000000..fb75572 --- /dev/null +++ b/examples/qwerty/qwerty.h @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for Qt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#ifndef QWERTY_H +#define QWERTY_H + +#include <qwidget.h> +#include <qmenubar.h> +#include <qmultilineedit.h> +#include <qprinter.h> + +class Editor : public QWidget +{ + Q_OBJECT +public: + Editor( QWidget *parent=0, const char *name="qwerty" ); + ~Editor(); + + void load( const QString& fileName, int code=-1 ); + +public slots: + void newDoc(); + void load(); + bool save(); + void print(); + void addEncoding(); + void toUpper(); + void toLower(); + void font(); +protected: + void resizeEvent( QResizeEvent * ); + void closeEvent( QCloseEvent * ); + +private slots: + void saveAsEncoding( int ); + void openAsEncoding( int ); + void textChanged(); + +private: + bool saveAs( const QString& fileName, int code=-1 ); + void rebuildCodecList(); + QMenuBar *m; + QMultiLineEdit *e; +#ifndef QT_NO_PRINTER + QPrinter printer; +#endif + QPopupMenu *save_as; + QPopupMenu *open_as; + bool changed; +}; + +#endif // QWERTY_H diff --git a/examples/qwerty/qwerty.pro b/examples/qwerty/qwerty.pro new file mode 100644 index 0000000..474333a --- /dev/null +++ b/examples/qwerty/qwerty.pro @@ -0,0 +1,11 @@ +TEMPLATE = app +TARGET = qwerty + +CONFIG += qt warn_on release +DEPENDPATH = ../../include + +REQUIRES = large-config + +HEADERS = qwerty.h +SOURCES = main.cpp \ + qwerty.cpp diff --git a/examples/qwerty/unicode.txt b/examples/qwerty/unicode.txt Binary files differnew file mode 100644 index 0000000..1d08d41 --- /dev/null +++ b/examples/qwerty/unicode.txt |