1 /***************************************************************************
2 * Copyright (C) 2007 by Dominik Seichter *
3 * domseichter@web.de *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU Library General Public License as *
7 * published by the Free Software Foundation; either version 2 of the *
8 * License, or (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU Library General Public *
16 * License along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 * *
20 * In addition, as a special exception, the copyright holders give *
21 * permission to link the code of portions of this program with the *
22 * OpenSSL library under certain conditions as described in each *
23 * individual source file, and distribute linked combinations *
24 * including the two. *
25 * You must obey the GNU General Public License in all respects *
26 * for all of the code used other than OpenSSL. If you modify *
27 * file(s) with this exception, you may extend this exception to your *
28 * version of the file(s), but you are not obligated to do so. If you *
29 * do not wish to do so, delete this exception statement from your *
30 * version. If you delete this exception statement from all source *
31 * files in the program, then also delete it here. *
32 ***************************************************************************/
33
34 #include "PdfEncoding.h"
35
36 #include "PdfDictionary.h"
37 #include "PdfLocale.h"
38 #include "util/PdfMutexWrapper.h"
39 #include "PdfDefinesPrivate.h"
40 #include "base/PdfStream.h"
41 #include "base/PdfContentsTokenizer.h"
42
43 #include "doc/PdfFont.h"
44
45 #include <stack>
46 #include <stdlib.h>
47 #include <string.h>
48 #include <limits>
49 #include <sstream>
50 #include "PdfArray.h"
51 #include "doc/PdfDifferenceEncoding.h"
52
53 namespace PoDoFo {
54
PdfEncoding(int nFirstChar,int nLastChar,PdfObject * pToUnicode)55 PdfEncoding::PdfEncoding( int nFirstChar, int nLastChar, PdfObject* pToUnicode )
56 : m_bToUnicodeIsLoaded(false), m_nFirstChar( nFirstChar ), m_nLastChar( nLastChar ), m_pToUnicode(pToUnicode)
57 {
58 if( !(m_nFirstChar < m_nLastChar) )
59 {
60 PODOFO_RAISE_ERROR_INFO( ePdfError_ValueOutOfRange, "PdfEncoding: nFirstChar must be smaller than nLastChar" );
61 }
62
63 ParseToUnicode();
64 }
65
~PdfEncoding()66 PdfEncoding::~PdfEncoding()
67 {
68
69 }
70
ConvertToUnicode(const PdfString & rEncodedString,const PdfFont *) const71 PdfString PdfEncoding::ConvertToUnicode(const PdfString & rEncodedString, const PdfFont*) const
72 {
73
74 if(!m_toUnicode.empty())
75 {
76
77 const pdf_utf16be* pStr = reinterpret_cast<const pdf_utf16be*>(rEncodedString.GetString());
78 const size_t lLen = rEncodedString.GetLength()/2;
79 pdf_utf16be lCID, lUnicodeValue;
80
81 pdf_utf16be* pszUtf16 = static_cast<pdf_utf16be*>(podofo_calloc(lLen, sizeof(pdf_utf16be)));
82 if( !pszUtf16 )
83 {
84 PODOFO_RAISE_ERROR( ePdfError_OutOfMemory );
85 }
86
87 for(size_t i = 0 ; i<lLen ; i++)
88 {
89
90 #ifdef PODOFO_IS_LITTLE_ENDIAN
91 lCID = (pStr[i] << 8) | (pStr[i] >> 8 );
92 #else
93 lCID = pStr[i];
94 #endif // PODOFO_IS_LITTLE_ENDIAN
95
96 lUnicodeValue = this->GetUnicodeValue(lCID);
97
98 #ifdef PODOFO_IS_LITTLE_ENDIAN
99 pszUtf16[i] = (lUnicodeValue << 8) | (lUnicodeValue >> 8 );
100 #else
101 pszUtf16[i] = lUnicodeValue;
102 #endif // PODOFO_IS_LITTLE_ENDIAN
103 }
104
105 PdfString ret( pszUtf16, lLen );
106 podofo_free( pszUtf16 );
107
108 return ret;
109
110 }
111 else
112 return(PdfString("\0"));
113 }
114
ConvertToEncoding(const PdfString & rString,const PdfFont * pFont) const115 PdfRefCountedBuffer PdfEncoding::ConvertToEncoding( const PdfString & rString, const PdfFont* pFont ) const
116 {
117 if(!m_toUnicode.empty())
118 {
119 // Get the string in UTF-16be format
120 PdfString sStr = rString.ToUnicode();
121 const pdf_utf16be* pStr = sStr.GetUnicode();
122 pdf_utf16be lUnicodeValue, lCID;
123
124 std::ostringstream out;
125 PdfLocaleImbue(out);
126
127 while( *pStr )
128 {
129
130 #ifdef PODOFO_IS_LITTLE_ENDIAN
131 lUnicodeValue = (*pStr << 8) | (*pStr >> 8);
132 #else
133 lUnicodeValue = *pStr;
134 #endif // PODOFO_IS_LITTLE_ENDIAN
135
136 lCID = this->GetCIDValue(lUnicodeValue);
137 if (lCID == 0 && pFont) {
138 #ifdef PODOFO_IS_LITTLE_ENDIAN
139 lCID = static_cast<pdf_utf16be>(pFont->GetFontMetrics()->GetGlyphId( (((*pStr & 0xff) << 8) | ((*pStr & 0xff00) >> 8)) ));
140 #else
141 lCID = static_cast<pdf_utf16be>(pFont->GetFontMetrics()->GetGlyphId( *pStr ));
142 #endif // PODOFO_IS_LITTLE_ENDIAN
143 }
144
145 out << static_cast<unsigned char>((lCID & 0xff00) >> 8);
146 out << static_cast<unsigned char>(lCID & 0x00ff);
147
148 ++pStr;
149 }
150
151 PdfRefCountedBuffer buffer( out.str().length() );
152 memcpy( buffer.GetBuffer(), out.str().c_str(), out.str().length() );
153 return buffer;
154 }
155 else
156 return PdfRefCountedBuffer();
157 }
158
ParseToUnicode()159 void PdfEncoding::ParseToUnicode()
160 {
161 if (m_pToUnicode && m_pToUnicode->HasStream())
162 {
163 std::stack<std::string> stkToken;
164 pdf_uint16 loop = 0;
165 char *streamBuffer;
166 const char *streamToken = NULL;
167 EPdfTokenType *streamTokenType = NULL;
168 pdf_long streamBufferLen;
169 bool in_beginbfrange = 0;
170 bool in_beginbfchar = 0;
171 pdf_uint16 range_entries = 0;
172 pdf_uint16 char_entries = 0;
173 pdf_uint16 inside_hex_string = 0;
174 pdf_uint16 inside_array = 0;
175 pdf_uint16 range_start = 0;
176 pdf_uint16 range_end = 0;
177 pdf_uint16 i = 0;
178 pdf_utf16be firstvalue = 0;
179 const PdfStream *CIDStreamdata = m_pToUnicode->GetStream ();
180 CIDStreamdata->GetFilteredCopy (&streamBuffer, &streamBufferLen);
181
182 PdfContentsTokenizer streamTokenizer (streamBuffer, streamBufferLen);
183 while (streamTokenizer.GetNextToken (streamToken, streamTokenType))
184 {
185 stkToken.push (streamToken);
186
187 if (strcmp (streamToken, ">") == 0)
188 {
189 if (inside_hex_string == 0)
190 PODOFO_RAISE_ERROR_INFO(ePdfError_InvalidStream, "CMap Error, got > before <")
191 else
192 inside_hex_string = 0;
193
194 if (inside_array == 0)
195 {
196 i++;
197 }
198 }
199
200 if (strcmp (streamToken, "]") == 0)
201 {
202 if (inside_array == 0)
203 PODOFO_RAISE_ERROR_INFO(ePdfError_InvalidStream, "CMap Error, got ] before [")
204 else
205 inside_array = 0;
206
207 i++;
208 loop++;
209 }
210
211 if (in_beginbfrange == 1)
212 {
213 if (loop < range_entries)
214 {
215 if (inside_hex_string == 1)
216 {
217 pdf_utf16be num_value;
218 std::stringstream ss;
219 ss << std::hex << streamToken;
220 ss >> num_value;
221 if (i % 3 == 0)
222 range_start = num_value;
223 if (i % 3 == 1)
224 {
225 range_end = num_value;
226 }
227 if (i % 3 == 2)
228 {
229 if (inside_array == 0)
230 {
231 for (int k = range_start; k <= range_end; k++)
232 {
233 m_toUnicode[k] = num_value;
234 num_value++;
235 }
236
237 loop++;
238 }
239 else
240 {
241 m_toUnicode[range_start] = num_value;
242 }
243
244 range_start++;
245 }
246 }
247 }
248 }
249
250 if (in_beginbfchar == 1)
251 {
252 if (loop < char_entries)
253 {
254 if (inside_hex_string == 1)
255 {
256 pdf_utf16be num_value;
257 std::stringstream ss;
258 ss << std::hex << streamToken;
259 ss >> num_value;
260 if (i % 2 == 0)
261 {
262 firstvalue = num_value;
263 }
264 if (i % 2 == 1)
265 {
266 m_toUnicode[firstvalue] = num_value;
267 }
268 }
269 }
270 }
271
272
273 if (strcmp (streamToken, "<") == 0)
274 {
275 inside_hex_string = 1;
276 }
277
278
279
280 if (strcmp (streamToken, "[") == 0)
281 {
282 inside_array = 1;
283 }
284
285
286 if (strcmp (streamToken, "beginbfrange") == 0)
287 {
288 // need 2 entries - one to pop() and one for top()
289 if ( stkToken.size() < 2 )
290 {
291 PODOFO_RAISE_ERROR_INFO(ePdfError_InvalidStream, "CMap missing object number before beginbfrange");
292 }
293
294 i = loop = 0;
295 in_beginbfrange = 1;
296 stkToken.pop ();
297 std::stringstream ss;
298 ss << std::hex << stkToken.top ();
299 ss >> range_entries;
300 }
301
302 if (strcmp (streamToken, "endbfrange") == 0)
303 {
304 in_beginbfrange = 0;
305 i = 0;
306 }
307
308 if (strcmp (streamToken, "beginbfchar") == 0)
309 {
310 // need 2 entries - one to pop() and one for top()
311 if ( stkToken.size() < 2 )
312 {
313 PODOFO_RAISE_ERROR_INFO(ePdfError_InvalidStream, "CMap missing object number before beginbfchar");
314 }
315
316 i = loop = 0;
317 in_beginbfchar = 1;
318 stkToken.pop ();
319 std::stringstream ss;
320 ss << std::hex << stkToken.top ();
321 ss >> char_entries;
322 }
323
324 if (strcmp (streamToken, "endbfchar") == 0)
325 {
326 in_beginbfchar = 0;
327 i = 0;
328 }
329 }
330
331 podofo_free(streamBuffer);
332
333 m_bToUnicodeIsLoaded = true;
334 }
335 }
336
GetUnicodeValue(pdf_utf16be value) const337 pdf_utf16be PdfEncoding::GetUnicodeValue( pdf_utf16be value ) const
338 {
339 if(!m_toUnicode.empty())
340 {
341 const std::map<pdf_utf16be, pdf_utf16be>::const_iterator found = m_toUnicode.find(value);
342 return (found == m_toUnicode.end() ? 0 : found->second);
343 }
344
345 return 0;
346 }
347
GetCIDValue(pdf_utf16be lUnicodeValue) const348 pdf_utf16be PdfEncoding::GetCIDValue( pdf_utf16be lUnicodeValue ) const
349 {
350 if(!m_toUnicode.empty())
351 {
352 // TODO: optimize
353 for(std::map<pdf_utf16be, pdf_utf16be>::const_iterator it = m_toUnicode.begin(); it != m_toUnicode.end(); ++it)
354 if(it->second == lUnicodeValue)
355 return it->first;
356 }
357
358 return 0;
359 }
360
361 // -----------------------------------------------------
362 // PdfSimpleEncoding
363 // -----------------------------------------------------
PdfSimpleEncoding(const PdfName & rName)364 PdfSimpleEncoding::PdfSimpleEncoding( const PdfName & rName )
365 : PdfEncoding( 0, 255 ), m_mutex( new PoDoFo::Util::PdfMutex() ), m_name( rName ), m_pEncodingTable( NULL )
366 {
367 }
368
~PdfSimpleEncoding()369 PdfSimpleEncoding::~PdfSimpleEncoding()
370 {
371 podofo_free( m_pEncodingTable );
372 delete m_mutex;
373 }
374
InitEncodingTable()375 void PdfSimpleEncoding::InitEncodingTable()
376 {
377 Util::PdfMutexWrapper wrapper( *m_mutex );
378 // CVE-2017-7379 - previously lTableLength was 0xffff, but pdf_utf16be characters can be in range 0..0xffff so this
379 // caused out-by-one heap overflow when character 0xffff was encoded
380 const long lTableLength = std::numeric_limits<pdf_utf16be>::max() + 1;
381 const pdf_utf16be* cpUnicodeTable = this->GetToUnicodeTable();
382
383 if( !m_pEncodingTable ) // double check
384 {
385 m_pEncodingTable = static_cast<char*>(podofo_calloc(lTableLength, sizeof(char)));
386 if (!m_pEncodingTable)
387 {
388 PODOFO_RAISE_ERROR(ePdfError_OutOfMemory);
389 }
390
391 // fill the table with data
392 for( size_t i=0; i<256; i++ )
393 {
394 m_pEncodingTable[ static_cast<size_t>(cpUnicodeTable[i]) ] =
395 static_cast<unsigned char>(i);
396 }
397 }
398 }
399
AddToDictionary(PdfDictionary & rDictionary) const400 void PdfSimpleEncoding::AddToDictionary( PdfDictionary & rDictionary ) const
401 {
402 rDictionary.AddKey( PdfName("Encoding"), m_name );
403 }
404
GetCharCode(int nIndex) const405 pdf_utf16be PdfSimpleEncoding::GetCharCode( int nIndex ) const
406 {
407 if( nIndex < this->GetFirstChar() ||
408 nIndex > this->GetLastChar() )
409 {
410 PODOFO_RAISE_ERROR( ePdfError_ValueOutOfRange );
411 }
412
413 const pdf_utf16be* cpUnicodeTable = this->GetToUnicodeTable();
414
415 #ifdef PODOFO_IS_LITTLE_ENDIAN
416 return ((cpUnicodeTable[nIndex] & 0xff00) >> 8) | ((cpUnicodeTable[nIndex] & 0xff) << 8);
417 #else
418 return cpUnicodeTable[nIndex];
419 #endif // PODOFO_IS_LITTLE_ENDIAN
420
421 }
422
ConvertToUnicode(const PdfString & rEncodedString,const PdfFont * pFont) const423 PdfString PdfSimpleEncoding::ConvertToUnicode( const PdfString & rEncodedString, const PdfFont* pFont) const
424 {
425 if(m_bToUnicodeIsLoaded)
426 {
427 return PdfEncoding::ConvertToUnicode(rEncodedString, pFont);
428 }
429 else
430 {
431 const pdf_utf16be* cpUnicodeTable = this->GetToUnicodeTable();
432 pdf_long lLen = rEncodedString.GetLength();
433
434 if( lLen <= 0 )
435 return PdfString(L"");
436
437 pdf_utf16be* pszStringUtf16 = static_cast<pdf_utf16be*>(podofo_calloc( (lLen + 1), sizeof(pdf_utf16be)));
438 if( !pszStringUtf16 )
439 {
440 PODOFO_RAISE_ERROR( ePdfError_OutOfMemory );
441 }
442
443 const char* pszString = rEncodedString.GetString();
444 for( int i=0;i<lLen;i++ )
445 {
446 #ifdef PODOFO_IS_BIG_ENDIAN
447 pszStringUtf16[i] = cpUnicodeTable[ static_cast<unsigned char>(*pszString) ];
448 #else
449 pszStringUtf16[i] =
450 ((( cpUnicodeTable[ static_cast<unsigned char>(*pszString) ] << 8 ) & 0xff00) |
451 (( cpUnicodeTable[ static_cast<unsigned char>(*pszString) ] >> 8 ) & 0x00ff));
452 #endif // PODOFO_IS_BIG_ENDIAN
453 ++pszString;
454 }
455
456 pszStringUtf16[lLen] = 0;
457
458 PdfString sStr( pszStringUtf16 );
459 podofo_free( pszStringUtf16 );
460
461 return sStr;
462 }
463 }
464
ConvertToEncoding(const PdfString & rString,const PdfFont * pFont) const465 PdfRefCountedBuffer PdfSimpleEncoding::ConvertToEncoding( const PdfString & rString, const PdfFont* pFont) const
466 {
467 if(m_bToUnicodeIsLoaded)
468 {
469 return PdfEncoding::ConvertToEncoding(rString, pFont);
470 }
471 else
472 {
473 if( !m_pEncodingTable )
474 const_cast<PdfSimpleEncoding*>(this)->InitEncodingTable();
475
476 PdfString sSrc = rString.ToUnicode(); // make sure the string is unicode and not PdfDocEncoding!
477 pdf_long lLen = sSrc.GetCharacterLength();
478
479 if( !lLen )
480 return PdfRefCountedBuffer();
481
482 char* pDest = static_cast<char*>(podofo_calloc( (lLen + 1), sizeof(char) ));
483 if( !pDest )
484 {
485 PODOFO_RAISE_ERROR( ePdfError_OutOfMemory );
486 }
487
488 const pdf_utf16be* pszUtf16 = sSrc.GetUnicode();
489 char* pCur = pDest;
490 long lNewLen = 0L;
491
492 for( int i=0;i<lLen;i++ )
493 {
494 pdf_utf16be val = pszUtf16[i];
495 #ifdef PODOFO_IS_LITTLE_ENDIAN
496 val = ((val & 0xff00) >> 8) | ((val & 0xff) << 8);
497 #endif // PODOFO_IS_LITTLE_ENDIAN
498
499 *pCur = m_pEncodingTable[val];
500 if( *pCur ) // ignore 0 characters, as they cannot be converted to the current encoding
501 {
502 ++pCur;
503 ++lNewLen;
504 }
505 }
506
507 *pCur = '\0';
508
509
510 PdfRefCountedBuffer cDest( lNewLen );
511 memcpy( cDest.GetBuffer(), pDest, lNewLen );
512 podofo_free( pDest );
513
514 return cDest;
515 }
516 }
517
GetUnicodeCharCode(pdf_utf16be unicodeValue) const518 char PdfSimpleEncoding::GetUnicodeCharCode(pdf_utf16be unicodeValue) const
519 {
520 if( !m_pEncodingTable )
521 const_cast<PdfSimpleEncoding*>(this)->InitEncodingTable();
522
523 #ifdef PODOFO_IS_LITTLE_ENDIAN
524 unicodeValue = ((unicodeValue & 0xff00) >> 8) | ((unicodeValue & 0xff) << 8);
525 #endif // PODOFO_IS_LITTLE_ENDIAN
526
527 return m_pEncodingTable[unicodeValue];
528 }
529
530 // -----------------------------------------------------
531 // PdfDocEncoding
532 // -----------------------------------------------------
533
534 // -----------------------------------------------------
535 //
536 // -----------------------------------------------------
GetToUnicodeTable() const537 const pdf_utf16be* PdfDocEncoding::GetToUnicodeTable() const
538 {
539 return PdfDocEncoding::s_cEncoding;
540 }
541
542 const pdf_utf16be PdfDocEncoding::s_cEncoding[256] = {
543 0x0000,
544 0x0001,
545 0x0002,
546 0x0003,
547 0x0004,
548 0x0005,
549 0x0006,
550 0x0007,
551 0x0008,
552 0x0009,
553 0x000A,
554 0x000B,
555 0x000C,
556 0x000D,
557 0x000E,
558 0x000F,
559 0x0010,
560 0x0011,
561 0x0012,
562 0x0013,
563 0x0014,
564 0x0015,
565 0x0017,
566 0x0017,
567 0x02D8,
568 0x02C7, // dec 25
569 0x02C6,
570 0x02D9,
571 0x02DD,
572 0x02DB,
573 0x02DA,
574 0x02DC,
575 0x0020,
576 0x0021,
577 0x0022,
578 0x0023,
579 0x0024,
580 0x0025,
581 0x0026,
582 0x0027,
583 0x0028,
584 0x0029,
585 0x002A,
586 0x002B,
587 0x002C,
588 0x002D,
589 0x002E,
590 0x002F,
591 0x0030,
592 0x0031,
593 0x0032,
594 0x0033,
595 0x0034,
596 0x0035,
597 0x0036,
598 0x0037,
599 0x0038,
600 0x0039, // dec 57
601 0x003A,
602 0x003B,
603 0x003C,
604 0x003D,
605 0x003E,
606 0x003F,
607 0x0040,
608 0x0041,
609 0x0042,
610 0x0043,
611 0x0044,
612 0x0045,
613 0x0046,
614 0x0047,
615 0x0048,
616 0x0049,
617 0x004A,
618 0x004B,
619 0x004C,
620 0x004D,
621 0x004E,
622 0x004F,
623 0x0050,
624 0x0051,
625 0x0052,
626 0x0053,
627 0x0054,
628 0x0055,
629 0x0056,
630 0x0057,
631 0x0058,
632 0x0059, // 89
633 0x005A,
634 0x005B,
635 0x005C,
636 0x005D,
637 0x005E,
638 0x005F,
639 0x0060,
640 0x0061,
641 0x0062,
642 0x0063,
643 0x0064,
644 0x0065,
645 0x0066,
646 0x0067,
647 0x0068,
648 0x0069,
649 0x006A,
650 0x006B,
651 0x006C,
652 0x006D,
653 0x006E,
654 0x006F,
655 0x0070,
656 0x0071,
657 0x0072,
658 0x0073,
659 0x0074,
660 0x0075,
661 0x0076,
662 0x0077,
663 0x0078,
664 0x0079, //121
665 0x007A,
666 0x007B,
667 0x007C,
668 0x007D,
669 0x007E,
670 0x0000, // Undefined
671 0x2022,
672 0x2020,
673 0x2021,
674 0x2026,
675 0x2014,
676 0x2013,
677 0x0192,
678 0x2044,
679 0x2039,
680 0x203A,
681 0x2212,
682 0x2030,
683 0x201E,
684 0x201C,
685 0x201D,
686 0x2018,
687 0x2019,
688 0x201A,
689 0x2122,
690 0xFB01, // dec147
691 0xFB02,
692 0x0141,
693 0x0152,
694 0x0160,
695 0x0178,
696 0x017D,
697 0x0131,
698 0x0142,
699 0x0153,
700 0x0161,
701 0x017E,
702 0x0000, // Undefined
703 0x20AC, // Euro
704 0x00A1,
705 0x00A2,
706 0x00A3,
707 0x00A4,
708 0x00A5,
709 0x00A6,
710 0x00A7,
711 0x00A8,
712 0x00A9,
713 0x00AA,
714 0x00AB,
715 0x00AC,
716 0x0000, // Undefined
717 0x00AE,
718 0x00AF,
719 0x00B0,
720 0x00B1,
721 0x00B2,
722 0x00B3,
723 0x00B4,
724 0x00B5,
725 0x00B6,
726 0x00B7,
727 0x00B8,
728 0x00B9,
729 0x00BA,
730 0x00BB,
731 0x00BC,
732 0x00BD,
733 0x00BE,
734 0x00BF,
735 0x00C0,
736 0x00C1,
737 0x00C2,
738 0x00C3,
739 0x00C4,
740 0x00C5,
741 0x00C6,
742 0x00C7,
743 0x00C8,
744 0x00C9,
745 0x00CA,
746 0x00CB,
747 0x00CC,
748 0x00CD,
749 0x00CE,
750 0x00CF,
751 0x00D0,
752 0x00D1,
753 0x00D2,
754 0x00D3,
755 0x00D4,
756 0x00D5,
757 0x00D6,
758 0x00D7,
759 0x00D8,
760 0x00D9,
761 0x00DA,
762 0x00DB,
763 0x00DC,
764 0x00DD,
765 0x00DE,
766 0x00DF,
767 0x00E0,
768 0x00E1,
769 0x00E2,
770 0x00E3,
771 0x00E4,
772 0x00E5,
773 0x00E6,
774 0x00E7,
775 0x00E8,
776 0x00E9,
777 0x00EA,
778 0x00EB,
779 0x00EC,
780 0x00ED,
781 0x00EE,
782 0x00EF,
783 0x00F0,
784 0x00F1,
785 0x00F2,
786 0x00F3,
787 0x00F4,
788 0x00F5,
789 0x00F6,
790 0x00F7,
791 0x00F8,
792 0x00F9,
793 0x00FA,
794 0x00FB,
795 0x00FC,
796 0x00FD,
797 0x00FE,
798 0x00FF
799 };
800
801 // -----------------------------------------------------
802 // PdfWinAnsiEncoding
803 // See: http://www.microsoft.com/globaldev/reference/sbcs/1252.mspx
804 // -----------------------------------------------------
805
806 // -----------------------------------------------------
807 //
808 // -----------------------------------------------------
AddToDictionary(PdfDictionary & rDictionary) const809 void PdfWinAnsiEncoding::AddToDictionary( PdfDictionary & rDictionary ) const
810 {
811 PdfArray arDifferences;
812
813 for (int i = 0; i < 256; i++)
814 {
815 if (PdfWinAnsiEncoding::GetToUnicodeTable()[i] != this->GetToUnicodeTable()[i])
816 {
817 arDifferences.push_back(PdfObject((pdf_int64)i));
818 unsigned short shCode = this->GetToUnicodeTable()[i];
819 #ifdef PODOFO_IS_LITTLE_ENDIAN
820 shCode = ((shCode & 0x00FF) << 8) | ((shCode & 0xFF00) >> 8);
821 #endif
822 arDifferences.push_back( PdfDifferenceEncoding::UnicodeIDToName(shCode) );
823 }
824 }
825
826 if (!arDifferences.empty())
827 {
828 PdfDictionary dictEncoding;
829 dictEncoding.AddKey(PdfName("BaseEncoding"), PdfWinAnsiEncoding::GetName());
830 dictEncoding.AddKey(PdfName("Differences"), arDifferences);
831 rDictionary.AddKey(PdfName("Encoding"), dictEncoding);
832 }
833 else
834 {
835 PdfSimpleEncoding::AddToDictionary(rDictionary);
836 }
837 }
838
GetToUnicodeTable() const839 const pdf_utf16be* PdfWinAnsiEncoding::GetToUnicodeTable() const
840 {
841 return PdfWinAnsiEncoding::s_cEncoding;
842 }
843
844 const pdf_utf16be PdfWinAnsiEncoding::s_cEncoding[256] = {
845 0x0000, // NULL
846 0x0001, // START OF HEADING
847 0x0002, // START OF TEXT
848 0x0003, // END OF TEXT
849 0x0004, // END OF TRANSMISSION
850 0x0005, // ENQUIRY
851 0x0006, // ACKNOWLEDGE
852 0x0007, // BELL
853 0x0008, // BACKSPACE
854 0x0009, // HORIZONTAL TABULATION
855 0x000A, // LINE FEED
856 0x000B, // VERTICAL TABULATION
857 0x000C, // FORM FEED
858 0x000D, // CARRIAGE RETURN
859 0x000E, // SHIFT OUT
860 0x000F, // SHIFT IN
861 0x0010, // DATA LINK ESCAPE
862 0x0011, // DEVICE CONTROL ONE
863 0x0012, // DEVICE CONTROL TWO
864 0x0013, // DEVICE CONTROL THREE
865 0x0014, // DEVICE CONTROL FOUR
866 0x0015, // NEGATIVE ACKNOWLEDGE
867 0x0016, // SYNCHRONOUS IDLE
868 0x0017, // END OF TRANSMISSION BLOCK
869 0x0018, // CANCEL
870 0x0019, // END OF MEDIUM
871 0x001A, // SUBSTITUTE
872 0x001B, // ESCAPE
873 0x001C, // FILE SEPARATOR
874 0x001D, // GROUP SEPARATOR
875 0x001E, // RECORD SEPARATOR
876 0x001F, // UNIT SEPARATOR
877 0x0020, // SPACE
878 0x0021, // EXCLAMATION MARK
879 0x0022, // QUOTATION MARK
880 0x0023, // NUMBER SIGN
881 0x0024, // DOLLAR SIGN
882 0x0025, // PERCENT SIGN
883 0x0026, // AMPERSAND
884 0x0027, // APOSTROPHE
885 0x0028, // LEFT PARENTHESIS
886 0x0029, // RIGHT PARENTHESIS
887 0x002A, // ASTERISK
888 0x002B, // PLUS SIGN
889 0x002C, // COMMA
890 0x002D, // HYPHEN-MINUS
891 0x002E, // FULL STOP
892 0x002F, // SOLIDUS
893 0x0030, // DIGIT ZERO
894 0x0031, // DIGIT ONE
895 0x0032, // DIGIT TWO
896 0x0033, // DIGIT THREE
897 0x0034, // DIGIT FOUR
898 0x0035, // DIGIT FIVE
899 0x0036, // DIGIT SIX
900 0x0037, // DIGIT SEVEN
901 0x0038, // DIGIT EIGHT
902 0x0039, // DIGIT NINE
903 0x003A, // COLON
904 0x003B, // SEMICOLON
905 0x003C, // LESS-THAN SIGN
906 0x003D, // EQUALS SIGN
907 0x003E, // GREATER-THAN SIGN
908 0x003F, // QUESTION MARK
909 0x0040, // COMMERCIAL AT
910 0x0041, // LATIN CAPITAL LETTER A
911 0x0042, // LATIN CAPITAL LETTER B
912 0x0043, // LATIN CAPITAL LETTER C
913 0x0044, // LATIN CAPITAL LETTER D
914 0x0045, // LATIN CAPITAL LETTER E
915 0x0046, // LATIN CAPITAL LETTER F
916 0x0047, // LATIN CAPITAL LETTER G
917 0x0048, // LATIN CAPITAL LETTER H
918 0x0049, // LATIN CAPITAL LETTER I
919 0x004A, // LATIN CAPITAL LETTER J
920 0x004B, // LATIN CAPITAL LETTER K
921 0x004C, // LATIN CAPITAL LETTER L
922 0x004D, // LATIN CAPITAL LETTER M
923 0x004E, // LATIN CAPITAL LETTER N
924 0x004F, // LATIN CAPITAL LETTER O
925 0x0050, // LATIN CAPITAL LETTER P
926 0x0051, // LATIN CAPITAL LETTER Q
927 0x0052, // LATIN CAPITAL LETTER R
928 0x0053, // LATIN CAPITAL LETTER S
929 0x0054, // LATIN CAPITAL LETTER T
930 0x0055, // LATIN CAPITAL LETTER U
931 0x0056, // LATIN CAPITAL LETTER V
932 0x0057, // LATIN CAPITAL LETTER W
933 0x0058, // LATIN CAPITAL LETTER X
934 0x0059, // LATIN CAPITAL LETTER Y
935 0x005A, // LATIN CAPITAL LETTER Z
936 0x005B, // LEFT SQUARE BRACKET
937 0x005C, // REVERSE SOLIDUS
938 0x005D, // RIGHT SQUARE BRACKET
939 0x005E, // CIRCUMFLEX ACCENT
940 0x005F, // LOW LINE
941 0x0060, // GRAVE ACCENT
942 0x0061, // LATIN SMALL LETTER A
943 0x0062, // LATIN SMALL LETTER B
944 0x0063, // LATIN SMALL LETTER C
945 0x0064, // LATIN SMALL LETTER D
946 0x0065, // LATIN SMALL LETTER E
947 0x0066, // LATIN SMALL LETTER F
948 0x0067, // LATIN SMALL LETTER G
949 0x0068, // LATIN SMALL LETTER H
950 0x0069, // LATIN SMALL LETTER I
951 0x006A, // LATIN SMALL LETTER J
952 0x006B, // LATIN SMALL LETTER K
953 0x006C, // LATIN SMALL LETTER L
954 0x006D, // LATIN SMALL LETTER M
955 0x006E, // LATIN SMALL LETTER N
956 0x006F, // LATIN SMALL LETTER O
957 0x0070, // LATIN SMALL LETTER P
958 0x0071, // LATIN SMALL LETTER Q
959 0x0072, // LATIN SMALL LETTER R
960 0x0073, // LATIN SMALL LETTER S
961 0x0074, // LATIN SMALL LETTER T
962 0x0075, // LATIN SMALL LETTER U
963 0x0076, // LATIN SMALL LETTER V
964 0x0077, // LATIN SMALL LETTER W
965 0x0078, // LATIN SMALL LETTER X
966 0x0079, // LATIN SMALL LETTER Y
967 0x007A, // LATIN SMALL LETTER Z
968 0x007B, // LEFT CURLY BRACKET
969 0x007C, // VERTICAL LINE
970 0x007D, // RIGHT CURLY BRACKET
971 0x007E, // TILDE
972 0x007F, // DELETE
973 0x20AC, // EURO SIGN
974 0x0000,
975 0x201A, // SINGLE LOW-9 QUOTATION MARK
976 0x0192, // LATIN SMALL LETTER F WITH HOOK
977 0x201E, // DOUBLE LOW-9 QUOTATION MARK
978 0x2026, // HORIZONTAL ELLIPSIS
979 0x2020, // DAGGER
980 0x2021, // DOUBLE DAGGER
981 0x02C6, // MODIFIER LETTER CIRCUMFLEX ACCENT
982 0x2030, // PER MILLE SIGN
983 0x0160, // LATIN CAPITAL LETTER S WITH CARON
984 0x2039, // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
985 0x0152, // LATIN CAPITAL LIGATURE OE
986 0x0000,
987 0x017D, // LATIN CAPITAL LETTER Z WITH CARON
988 0x0000,
989 0x0000,
990 0x2018, // LEFT SINGLE QUOTATION MARK
991 0x2019, // RIGHT SINGLE QUOTATION MARK
992 0x201C, // LEFT DOUBLE QUOTATION MARK
993 0x201D, // RIGHT DOUBLE QUOTATION MARK
994 0x2022, // BULLET
995 0x2013, // EN DASH
996 0x2014, // EM DASH
997 0x02DC, // SMALL TILDE
998 0x2122, // TRADE MARK SIGN
999 0x0161, // LATIN SMALL LETTER S WITH CARON
1000 0x203A, // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
1001 0x0153, // LATIN SMALL LIGATURE OE
1002 0x0000,
1003 0x017E, // LATIN SMALL LETTER Z WITH CARON
1004 0x0178, // LATIN CAPITAL LETTER Y WITH DIAERESIS
1005 0x00A0, // NO-BREAK SPACE
1006 0x00A1, // INVERTED EXCLAMATION MARK
1007 0x00A2, // CENT SIGN
1008 0x00A3, // POUND SIGN
1009 0x00A4, // CURRENCY SIGN
1010 0x00A5, // YEN SIGN
1011 0x00A6, // BROKEN BAR
1012 0x00A7, // SECTION SIGN
1013 0x00A8, // DIAERESIS
1014 0x00A9, // COPYRIGHT SIGN
1015 0x00AA, // FEMININE ORDINAL INDICATOR
1016 0x00AB, // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
1017 0x00AC, // NOT SIGN
1018 0x00AD, // SOFT HYPHEN
1019 0x00AE, // REGISTERED SIGN
1020 0x00AF, // MACRON
1021 0x00B0, // DEGREE SIGN
1022 0x00B1, // PLUS-MINUS SIGN
1023 0x00B2, // SUPERSCRIPT TWO
1024 0x00B3, // SUPERSCRIPT THREE
1025 0x00B4, // ACUTE ACCENT
1026 0x00B5, // MICRO SIGN
1027 0x00B6, // PILCROW SIGN
1028 0x00B7, // MIDDLE DOT
1029 0x00B8, // CEDILLA
1030 0x00B9, // SUPERSCRIPT ONE
1031 0x00BA, // MASCULINE ORDINAL INDICATOR
1032 0x00BB, // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
1033 0x00BC, // VULGAR FRACTION ONE QUARTER
1034 0x00BD, // VULGAR FRACTION ONE HALF
1035 0x00BE, // VULGAR FRACTION THREE QUARTERS
1036 0x00BF, // INVERTED QUESTION MARK
1037 0x00C0, // LATIN CAPITAL LETTER A WITH GRAVE
1038 0x00C1, // LATIN CAPITAL LETTER A WITH ACUTE
1039 0x00C2, // LATIN CAPITAL LETTER A WITH CIRCUMFLEX
1040 0x00C3, // LATIN CAPITAL LETTER A WITH TILDE
1041 0x00C4, // LATIN CAPITAL LETTER A WITH DIAERESIS
1042 0x00C5, // LATIN CAPITAL LETTER A WITH RING ABOVE
1043 0x00C6, // LATIN CAPITAL LETTER AE
1044 0x00C7, // LATIN CAPITAL LETTER C WITH CEDILLA
1045 0x00C8, // LATIN CAPITAL LETTER E WITH GRAVE
1046 0x00C9, // LATIN CAPITAL LETTER E WITH ACUTE
1047 0x00CA, // LATIN CAPITAL LETTER E WITH CIRCUMFLEX
1048 0x00CB, // LATIN CAPITAL LETTER E WITH DIAERESIS
1049 0x00CC, // LATIN CAPITAL LETTER I WITH GRAVE
1050 0x00CD, // LATIN CAPITAL LETTER I WITH ACUTE
1051 0x00CE, // LATIN CAPITAL LETTER I WITH CIRCUMFLEX
1052 0x00CF, // LATIN CAPITAL LETTER I WITH DIAERESIS
1053 0x00D0, // LATIN CAPITAL LETTER ETH
1054 0x00D1, // LATIN CAPITAL LETTER N WITH TILDE
1055 0x00D2, // LATIN CAPITAL LETTER O WITH GRAVE
1056 0x00D3, // LATIN CAPITAL LETTER O WITH ACUTE
1057 0x00D4, // LATIN CAPITAL LETTER O WITH CIRCUMFLEX
1058 0x00D5, // LATIN CAPITAL LETTER O WITH TILDE
1059 0x00D6, // LATIN CAPITAL LETTER O WITH DIAERESIS
1060 0x00D7, // MULTIPLICATION SIGN
1061 0x00D8, // LATIN CAPITAL LETTER O WITH STROKE
1062 0x00D9, // LATIN CAPITAL LETTER U WITH GRAVE
1063 0x00DA, // LATIN CAPITAL LETTER U WITH ACUTE
1064 0x00DB, // LATIN CAPITAL LETTER U WITH CIRCUMFLEX
1065 0x00DC, // LATIN CAPITAL LETTER U WITH DIAERESIS
1066 0x00DD, // LATIN CAPITAL LETTER Y WITH ACUTE
1067 0x00DE, // LATIN CAPITAL LETTER THORN
1068 0x00DF, // LATIN SMALL LETTER SHARP S
1069 0x00E0, // LATIN SMALL LETTER A WITH GRAVE
1070 0x00E1, // LATIN SMALL LETTER A WITH ACUTE
1071 0x00E2, // LATIN SMALL LETTER A WITH CIRCUMFLEX
1072 0x00E3, // LATIN SMALL LETTER A WITH TILDE
1073 0x00E4, // LATIN SMALL LETTER A WITH DIAERESIS
1074 0x00E5, // LATIN SMALL LETTER A WITH RING ABOVE
1075 0x00E6, // LATIN SMALL LETTER AE
1076 0x00E7, // LATIN SMALL LETTER C WITH CEDILLA
1077 0x00E8, // LATIN SMALL LETTER E WITH GRAVE
1078 0x00E9, // LATIN SMALL LETTER E WITH ACUTE
1079 0x00EA, // LATIN SMALL LETTER E WITH CIRCUMFLEX
1080 0x00EB, // LATIN SMALL LETTER E WITH DIAERESIS
1081 0x00EC, // LATIN SMALL LETTER I WITH GRAVE
1082 0x00ED, // LATIN SMALL LETTER I WITH ACUTE
1083 0x00EE, // LATIN SMALL LETTER I WITH CIRCUMFLEX
1084 0x00EF, // LATIN SMALL LETTER I WITH DIAERESIS
1085 0x00F0, // LATIN SMALL LETTER ETH
1086 0x00F1, // LATIN SMALL LETTER N WITH TILDE
1087 0x00F2, // LATIN SMALL LETTER O WITH GRAVE
1088 0x00F3, // LATIN SMALL LETTER O WITH ACUTE
1089 0x00F4, // LATIN SMALL LETTER O WITH CIRCUMFLEX
1090 0x00F5, // LATIN SMALL LETTER O WITH TILDE
1091 0x00F6, // LATIN SMALL LETTER O WITH DIAERESIS
1092 0x00F7, // DIVISION SIGN
1093 0x00F8, // LATIN SMALL LETTER O WITH STROKE
1094 0x00F9, // LATIN SMALL LETTER U WITH GRAVE
1095 0x00FA, // LATIN SMALL LETTER U WITH ACUTE
1096 0x00FB, // LATIN SMALL LETTER U WITH CIRCUMFLEX
1097 0x00FC, // LATIN SMALL LETTER U WITH DIAERESIS
1098 0x00FD, // LATIN SMALL LETTER Y WITH ACUTE
1099 0x00FE, // LATIN SMALL LETTER THORN
1100 0x00FF, // LATIN SMALL LETTER Y WITH DIAERESIS
1101 };
1102
1103 // -----------------------------------------------------
1104 // PdfMacRomanEncoding
1105 // -----------------------------------------------------
1106
1107 // -----------------------------------------------------
1108 //
1109 // -----------------------------------------------------
GetToUnicodeTable() const1110 const pdf_utf16be* PdfMacRomanEncoding::GetToUnicodeTable() const
1111 {
1112 return PdfMacRomanEncoding::s_cEncoding;
1113 }
1114
1115 const pdf_utf16be PdfMacRomanEncoding::s_cEncoding[256] = {
1116 0x0000, // NULL
1117 0x0001, // START OF HEADING
1118 0x0002, // START OF TEXT
1119 0x0003, // END OF TEXT
1120 0x0004, // END OF TRANSMISSION
1121 0x0005, // ENQUIRY
1122 0x0006, // ACKNOWLEDGE
1123 0x0007, // BELL
1124 0x0008, // BACKSPACE
1125 0x0009, // HORIZONTAL TABULATION
1126 0x000A, // LINE FEED
1127 0x000B, // VERTICAL TABULATION
1128 0x000C, // FORM FEED
1129 0x000D, // CARRIAGE RETURN
1130 0x000E, // SHIFT OUT
1131 0x000F, // SHIFT IN
1132 0x0010, // DATA LINK ESCAPE
1133 0x0011, // DEVICE CONTROL ONE
1134 0x0012, // DEVICE CONTROL TWO
1135 0x0013, // DEVICE CONTROL THREE
1136 0x0014, // DEVICE CONTROL FOUR
1137 0x0015, // NEGATIVE ACKNOWLEDGE
1138 0x0016, // SYNCHRONOUS IDLE
1139 0x0017, // END OF TRANSMISSION BLOCK
1140 0x0018, // CANCEL
1141 0x0019, // END OF MEDIUM
1142 0x001A, // SUBSTITUTE
1143 0x001B, // ESCAPE
1144 0x001C, // FILE SEPARATOR
1145 0x001D, // GROUP SEPARATOR
1146 0x001E, // RECORD SEPARATOR
1147 0x001F, // UNIT SEPARATOR
1148 0x0020, // SPACE
1149 0x0021, // EXCLAMATION MARK
1150 0x0022, // QUOTATION MARK
1151 0x0023, // NUMBER SIGN
1152 0x0024, // DOLLAR SIGN
1153 0x0025, // PERCENT SIGN
1154 0x0026, // AMPERSAND
1155 0x0027, // APOSTROPHE
1156 0x0028, // LEFT PARENTHESIS
1157 0x0029, // RIGHT PARENTHESIS
1158 0x002A, // ASTERISK
1159 0x002B, // PLUS SIGN
1160 0x002C, // COMMA
1161 0x002D, // HYPHEN-MINUS
1162 0x002E, // FULL STOP
1163 0x002F, // SOLIDUS
1164 0x0030, // DIGIT ZERO
1165 0x0031, // DIGIT ONE
1166 0x0032, // DIGIT TWO
1167 0x0033, // DIGIT THREE
1168 0x0034, // DIGIT FOUR
1169 0x0035, // DIGIT FIVE
1170 0x0036, // DIGIT SIX
1171 0x0037, // DIGIT SEVEN
1172 0x0038, // DIGIT EIGHT
1173 0x0039, // DIGIT NINE
1174 0x003A, // COLON
1175 0x003B, // SEMICOLON
1176 0x003C, // LESS-THAN SIGN
1177 0x003D, // EQUALS SIGN
1178 0x003E, // GREATER-THAN SIGN
1179 0x003F, // QUESTION MARK
1180 0x0040, // COMMERCIAL AT
1181 0x0041, // LATIN CAPITAL LETTER A
1182 0x0042, // LATIN CAPITAL LETTER B
1183 0x0043, // LATIN CAPITAL LETTER C
1184 0x0044, // LATIN CAPITAL LETTER D
1185 0x0045, // LATIN CAPITAL LETTER E
1186 0x0046, // LATIN CAPITAL LETTER F
1187 0x0047, // LATIN CAPITAL LETTER G
1188 0x0048, // LATIN CAPITAL LETTER H
1189 0x0049, // LATIN CAPITAL LETTER I
1190 0x004A, // LATIN CAPITAL LETTER J
1191 0x004B, // LATIN CAPITAL LETTER K
1192 0x004C, // LATIN CAPITAL LETTER L
1193 0x004D, // LATIN CAPITAL LETTER M
1194 0x004E, // LATIN CAPITAL LETTER N
1195 0x004F, // LATIN CAPITAL LETTER O
1196 0x0050, // LATIN CAPITAL LETTER P
1197 0x0051, // LATIN CAPITAL LETTER Q
1198 0x0052, // LATIN CAPITAL LETTER R
1199 0x0053, // LATIN CAPITAL LETTER S
1200 0x0054, // LATIN CAPITAL LETTER T
1201 0x0055, // LATIN CAPITAL LETTER U
1202 0x0056, // LATIN CAPITAL LETTER V
1203 0x0057, // LATIN CAPITAL LETTER W
1204 0x0058, // LATIN CAPITAL LETTER X
1205 0x0059, // LATIN CAPITAL LETTER Y
1206 0x005A, // LATIN CAPITAL LETTER Z
1207 0x005B, // LEFT SQUARE BRACKET
1208 0x005C, // REVERSE SOLIDUS
1209 0x005D, // RIGHT SQUARE BRACKET
1210 0x005E, // CIRCUMFLEX ACCENT
1211 0x005F, // LOW LINE
1212 0x0060, // GRAVE ACCENT
1213 0x0061, // LATIN SMALL LETTER A
1214 0x0062, // LATIN SMALL LETTER B
1215 0x0063, // LATIN SMALL LETTER C
1216 0x0064, // LATIN SMALL LETTER D
1217 0x0065, // LATIN SMALL LETTER E
1218 0x0066, // LATIN SMALL LETTER F
1219 0x0067, // LATIN SMALL LETTER G
1220 0x0068, // LATIN SMALL LETTER H
1221 0x0069, // LATIN SMALL LETTER I
1222 0x006A, // LATIN SMALL LETTER J
1223 0x006B, // LATIN SMALL LETTER K
1224 0x006C, // LATIN SMALL LETTER L
1225 0x006D, // LATIN SMALL LETTER M
1226 0x006E, // LATIN SMALL LETTER N
1227 0x006F, // LATIN SMALL LETTER O
1228 0x0070, // LATIN SMALL LETTER P
1229 0x0071, // LATIN SMALL LETTER Q
1230 0x0072, // LATIN SMALL LETTER R
1231 0x0073, // LATIN SMALL LETTER S
1232 0x0074, // LATIN SMALL LETTER T
1233 0x0075, // LATIN SMALL LETTER U
1234 0x0076, // LATIN SMALL LETTER V
1235 0x0077, // LATIN SMALL LETTER W
1236 0x0078, // LATIN SMALL LETTER X
1237 0x0079, // LATIN SMALL LETTER Y
1238 0x007A, // LATIN SMALL LETTER Z
1239 0x007B, // LEFT CURLY BRACKET
1240 0x007C, // VERTICAL LINE
1241 0x007D, // RIGHT CURLY BRACKET
1242 0x007E, // TILDE
1243 0x007F, // DEL
1244 0x00C4, // LATIN CAPITAL LETTER A WITH DIAERESIS
1245 0x00C5, // LATIN CAPITAL LETTER A WITH RING ABOVE
1246 0x00C7, // LATIN CAPITAL LETTER C WITH CEDILLA
1247 0x00C9, // LATIN CAPITAL LETTER E WITH ACUTE
1248 0x00D1, // LATIN CAPITAL LETTER N WITH TILDE
1249 0x00D6, // LATIN CAPITAL LETTER O WITH DIAERESIS
1250 0x00DC, // LATIN CAPITAL LETTER U WITH DIAERESIS
1251 0x00E1, // LATIN SMALL LETTER A WITH ACUTE
1252 0x00E0, // LATIN SMALL LETTER A WITH GRAVE
1253 0x00E2, // LATIN SMALL LETTER A WITH CIRCUMFLEX
1254 0x00E4, // LATIN SMALL LETTER A WITH DIAERESIS
1255 0x00E3, // LATIN SMALL LETTER A WITH TILDE
1256 0x00E5, // LATIN SMALL LETTER A WITH RING ABOVE
1257 0x00E7, // LATIN SMALL LETTER C WITH CEDILLA
1258 0x00E9, // LATIN SMALL LETTER E WITH ACUTE
1259 0x00E8, // LATIN SMALL LETTER E WITH GRAVE
1260 0x00EA, // LATIN SMALL LETTER E WITH CIRCUMFLEX
1261 0x00EB, // LATIN SMALL LETTER E WITH DIAERESIS
1262 0x00ED, // LATIN SMALL LETTER I WITH ACUTE
1263 0x00EC, // LATIN SMALL LETTER I WITH GRAVE
1264 0x00EE, // LATIN SMALL LETTER I WITH CIRCUMFLEX
1265 0x00EF, // LATIN SMALL LETTER I WITH DIAERESIS
1266 0x00F1, // LATIN SMALL LETTER N WITH TILDE
1267 0x00F3, // LATIN SMALL LETTER O WITH ACUTE
1268 0x00F2, // LATIN SMALL LETTER O WITH GRAVE
1269 0x00F4, // LATIN SMALL LETTER O WITH CIRCUMFLEX
1270 0x00F6, // LATIN SMALL LETTER O WITH DIAERESIS
1271 0x00F5, // LATIN SMALL LETTER O WITH TILDE
1272 0x00FA, // LATIN SMALL LETTER U WITH ACUTE
1273 0x00F9, // LATIN SMALL LETTER U WITH GRAVE
1274 0x00FB, // LATIN SMALL LETTER U WITH CIRCUMFLEX
1275 0x00FC, // LATIN SMALL LETTER U WITH DIAERESIS
1276 0x2020, // DAGGER
1277 0x00B0, // DEGREE SIGN
1278 0x00A2, // CENT SIGN
1279 0x00A3, // POUND SIGN
1280 0x00A7, // SECTION SIGN
1281 0x2022, // BULLET
1282 0x00B6, // PILCROW SIGN
1283 0x00DF, // LATIN SMALL LETTER SHARP S
1284 0x00AE, // REGISTERED SIGN
1285 0x00A9, // COPYRIGHT SIGN
1286 0x2122, // TRADE MARK SIGN
1287 0x00B4, // ACUTE ACCENT
1288 0x00A8, // DIAERESIS
1289 0x2260, // NOT EQUAL TO
1290 0x00C6, // LATIN CAPITAL LETTER AE
1291 0x00D8, // LATIN CAPITAL LETTER O WITH STROKE
1292 0x221E, // INFINITY
1293 0x00B1, // PLUS-MINUS SIGN
1294 0x2264, // LESS-THAN OR EQUAL TO
1295 0x2265, // GREATER-THAN OR EQUAL TO
1296 0x00A5, // YEN SIGN
1297 0x00B5, // MICRO SIGN
1298 0x2202, // PARTIAL DIFFERENTIAL
1299 0x2211, // N-ARY SUMMATION
1300 0x220F, // N-ARY PRODUCT
1301 0x03C0, // GREEK SMALL LETTER PI
1302 0x222B, // INTEGRAL
1303 0x00AA, // FEMININE ORDINAL INDICATOR
1304 0x00BA, // MASCULINE ORDINAL INDICATOR
1305 0x03A9, // GREEK CAPITAL LETTER OMEGA
1306 0x00E6, // LATIN SMALL LETTER AE
1307 0x00F8, // LATIN SMALL LETTER O WITH STROKE
1308 0x00BF, // INVERTED QUESTION MARK
1309 0x00A1, // INVERTED EXCLAMATION MARK
1310 0x00AC, // NOT SIGN
1311 0x221A, // SQUARE ROOT
1312 0x0192, // LATIN SMALL LETTER F WITH HOOK
1313 0x2248, // ALMOST EQUAL TO
1314 0x2206, // INCREMENT
1315 0x00AB, // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
1316 0x00BB, // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
1317 0x2026, // HORIZONTAL ELLIPSIS
1318 0x00A0, // NO-BREAK SPACE
1319 0x00C0, // LATIN CAPITAL LETTER A WITH GRAVE
1320 0x00C3, // LATIN CAPITAL LETTER A WITH TILDE
1321 0x00D5, // LATIN CAPITAL LETTER O WITH TILDE
1322 0x0152, // LATIN CAPITAL LIGATURE OE
1323 0x0153, // LATIN SMALL LIGATURE OE
1324 0x2013, // EN DASH
1325 0x2014, // EM DASH
1326 0x201C, // LEFT DOUBLE QUOTATION MARK
1327 0x201D, // RIGHT DOUBLE QUOTATION MARK
1328 0x2018, // LEFT SINGLE QUOTATION MARK
1329 0x2019, // RIGHT SINGLE QUOTATION MARK
1330 0x00F7, // DIVISION SIGN
1331 0x25CA, // LOZENGE
1332 0x00FF, // LATIN SMALL LETTER Y WITH DIAERESIS
1333 0x0178, // LATIN CAPITAL LETTER Y WITH DIAERESIS
1334 0x2044, // FRACTION SLASH
1335 0x20AC, // EURO SIGN
1336 0x2039, // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
1337 0x203A, // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
1338 0xFB01, // LATIN SMALL LIGATURE FI
1339 0xFB02, // LATIN SMALL LIGATURE FL
1340 0x2021, // DOUBLE DAGGER
1341 0x00B7, // MIDDLE DOT
1342 0x201A, // SINGLE LOW-9 QUOTATION MARK
1343 0x201E, // DOUBLE LOW-9 QUOTATION MARK
1344 0x2030, // PER MILLE SIGN
1345 0x00C2, // LATIN CAPITAL LETTER A WITH CIRCUMFLEX
1346 0x00CA, // LATIN CAPITAL LETTER E WITH CIRCUMFLEX
1347 0x00C1, // LATIN CAPITAL LETTER A WITH ACUTE
1348 0x00CB, // LATIN CAPITAL LETTER E WITH DIAERESIS
1349 0x00C8, // LATIN CAPITAL LETTER E WITH GRAVE
1350 0x00CD, // LATIN CAPITAL LETTER I WITH ACUTE
1351 0x00CE, // LATIN CAPITAL LETTER I WITH CIRCUMFLEX
1352 0x00CF, // LATIN CAPITAL LETTER I WITH DIAERESIS
1353 0x00CC, // LATIN CAPITAL LETTER I WITH GRAVE
1354 0x00D3, // LATIN CAPITAL LETTER O WITH ACUTE
1355 0x00D4, // LATIN CAPITAL LETTER O WITH CIRCUMFLEX
1356 0xF8FF, // Apple logo
1357 0x00D2, // LATIN CAPITAL LETTER O WITH GRAVE
1358 0x00DA, // LATIN CAPITAL LETTER U WITH ACUTE
1359 0x00DB, // LATIN CAPITAL LETTER U WITH CIRCUMFLEX
1360 0x00D9, // LATIN CAPITAL LETTER U WITH GRAVE
1361 0x0131, // LATIN SMALL LETTER DOTLESS I
1362 0x02C6, // MODIFIER LETTER CIRCUMFLEX ACCENT
1363 0x02DC, // SMALL TILDE
1364 0x00AF, // MACRON
1365 0x02D8, // BREVE
1366 0x02D9, // DOT ABOVE
1367 0x02DA, // RING ABOVE
1368 0x00B8, // CEDILLA
1369 0x02DD, // DOUBLE ACUTE ACCENT
1370 0x02DB, // OGONEK
1371 0x02C7, // CARON
1372 };
1373
1374 // OC 13.08.2010 New: PdfMacExpertEncoding
1375 // -----------------------------------------------------
1376 // PdfMacExpertEncoding
1377 // See: ghostscript-8.71/Resource/Init/gs_mex_e.ps
1378 // --> array of 256 glyphs for MacExpertEncoding
1379 // See: http://www.adobe.com/devnet/opentype/archives/glyphlist.txt
1380 // --> glyphs to unicodes
1381 // -----------------------------------------------------
1382
1383 // -----------------------------------------------------
1384 //
1385 // -----------------------------------------------------
GetToUnicodeTable() const1386 const pdf_utf16be* PdfMacExpertEncoding::GetToUnicodeTable() const
1387 {
1388 return PdfMacExpertEncoding::s_cEncoding;
1389 }
1390
1391 const pdf_utf16be PdfMacExpertEncoding::s_cEncoding[256] = {
1392 // \00x
1393 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1394 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1395 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1396 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1397 // \04x
1398 0x0020, 0xF721, 0xF6F8, 0xF7A2, 0xF724, 0xF6E4, 0xF726, 0xF7B4,
1399 0x207D, 0x207E, 0x2025, 0x2024, 0x002C, 0x002D, 0x002E, 0x2044,
1400 0xF730, 0xF731, 0xF732, 0xF733, 0xF734, 0xF735, 0xF736, 0xF737,
1401 0xF738, 0xF739, 0x003A, 0x003B, 0x0000, 0xF6DE, 0x0000, 0xF73F,
1402 // \10x
1403 0x0000, 0x0000, 0x0000, 0x0000, 0xF7F0, 0x0000, 0x0000, 0x00BC,
1404 0x00BD, 0x00BE, 0x215B, 0x215C, 0x215D, 0x215E, 0x2153, 0x2154,
1405 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFB00, 0xFB01,
1406 0xFB02, 0xFB03, 0xFB04, 0x208D, 0x0000, 0x208E, 0xF6F6, 0xF6E5,
1407 // \14x
1408 0xF760, 0xF761, 0xF762, 0xF763, 0xF764, 0xF765, 0xF766, 0xF767,
1409 0xF768, 0xF769, 0xF76A, 0xF76B, 0xF76C, 0xF76D, 0xF76E, 0xF76F,
1410 0xF770, 0xF771, 0xF772, 0xF773, 0xF774, 0xF775, 0xF776, 0xF777,
1411 0xF778, 0xF779, 0xF77A, 0x20A1, 0xF6DC, 0xF6DD, 0xF6FE, 0x0000,
1412 // \20x
1413 0x0000, 0xF6E9, 0xF6E0, 0x0000, 0x0000, 0x0000, 0x0000, 0xF7E1,
1414 0xF7E0, 0xF7E2, 0xF7E4, 0xF7E3, 0xF7E5, 0xF7E7, 0xF7E9, 0xF7E8,
1415 0xF7EA, 0xF7EB, 0xF7ED, 0xF7EC, 0xF7EE, 0xF7EF, 0xF7F1, 0xF7F3,
1416 0xF7F2, 0xF7F4, 0xF7F6, 0xF7F5, 0xF7FA, 0xF7F9, 0xF7FB, 0xF7FC,
1417 // \24x
1418 0x0000, 0x2078, 0x2084, 0x2083, 0x2086, 0x2088, 0x2087, 0xF6FD,
1419 0x0000, 0xF6DF, 0x2082, 0x0000, 0xF7A8, 0x0000, 0xF6F5, 0xF6F0,
1420 0x2085, 0x0000, 0xF6E1, 0xF6E7, 0xF7FD, 0x0000, 0xF6E3, 0x0000,
1421 0x0000, 0xF7FE, 0x0000, 0x2089, 0x2080, 0xF6FF, 0xF7E6, 0xF7F8,
1422 // \30x
1423 0xF7BF, 0x2081, 0xF6F9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1424 0x0000, 0xF7B8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xF6FA,
1425 0x2012, 0xF6E6, 0x0000, 0x0000, 0x0000, 0x0000, 0xF7A1, 0x0000,
1426 0xF7FF, 0x0000, 0x00B9, 0x00B2, 0x00B3, 0x2074, 0x2075, 0x2076,
1427 // \34x
1428 0x2077, 0x2079, 0x2070, 0x0000, 0xF6EC, 0xF6F1, 0xF6F3, 0x0000,
1429 0x0000, 0xF6ED, 0xF6F2, 0xF6EB, 0x0000, 0x0000, 0x0000, 0x0000,
1430 0x0000, 0xF6EE, 0xF6FB, 0xF6F4, 0xF7AF, 0xF6EA, 0x207F, 0xF6EF,
1431 0xF6E2, 0xF6E8, 0xF6F7, 0xF6FC, 0x0000, 0x0000, 0x0000, 0x0000
1432 };
1433
1434 // OC 13.08.2010 New: PdfStandardEncoding
1435 // -----------------------------------------------------
1436 // PdfStandardEncoding
1437 // See: http://unicode.org/Public/MAPPINGS/VENDORS/ADOBE/stdenc.txt
1438 // -----------------------------------------------------
1439
1440 // -----------------------------------------------------
1441 //
1442 // -----------------------------------------------------
GetToUnicodeTable() const1443 const pdf_utf16be* PdfStandardEncoding::GetToUnicodeTable() const
1444 {
1445 return PdfStandardEncoding::s_cEncoding;
1446 }
1447
1448 const pdf_utf16be PdfStandardEncoding::s_cEncoding[256] = {
1449 //0, // uncomment to check compiler error cause of 257 members
1450 // 0x00..0x1f undefined:
1451 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1452 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1453 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1454 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1455 0x0020, // 20 # SPACE # space
1456 // Duplicated char, commented out
1457 // 0x00A0, // 20 # NO-BREAK SPACE # space
1458 0x0021, // 21 # EXCLAMATION MARK # exclam
1459 0x0022, // 22 # QUOTATION MARK # quotedbl
1460 0x0023, // 23 # NUMBER SIGN # numbersign
1461 0x0024, // 24 # DOLLAR SIGN # dollar
1462 0x0025, // 25 # PERCENT SIGN # percent
1463 0x0026, // 26 # AMPERSAND # ampersand
1464 0x2019, // 27 # RIGHT SINGLE QUOTATION MARK # quoteright
1465 0x0028, // 28 # LEFT PARENTHESIS # parenleft
1466 0x0029, // 29 # RIGHT PARENTHESIS # parenright
1467 0x002A, // 2A # ASTERISK # asterisk
1468 0x002B, // 2B # PLUS SIGN # plus
1469 0x002C, // 2C # COMMA # comma
1470 0x002D, // 2D # HYPHEN-MINUS # hyphen
1471 // Duplicated char, commented out
1472 // 0x00AD, // 2D # SOFT HYPHEN # hyphen
1473 0x002E, // 2E # FULL STOP # period
1474 0x002F, // 2F # SOLIDUS # slash
1475 0x0030, // 30 # DIGIT ZERO # zero
1476 0x0031, // 31 # DIGIT ONE # one
1477 0x0032, // 32 # DIGIT TWO # two
1478 0x0033, // 33 # DIGIT THREE # three
1479 0x0034, // 34 # DIGIT FOUR # four
1480 0x0035, // 35 # DIGIT FIVE # five
1481 0x0036, // 36 # DIGIT SIX # six
1482 0x0037, // 37 # DIGIT SEVEN # seven
1483 0x0038, // 38 # DIGIT EIGHT # eight
1484 0x0039, // 39 # DIGIT NINE # nine
1485 0x003A, // 3A # COLON # colon
1486 0x003B, // 3B # SEMICOLON # semicolon
1487 0x003C, // 3C # LESS-THAN SIGN # less
1488 0x003D, // 3D # EQUALS SIGN # equal
1489 0x003E, // 3E # GREATER-THAN SIGN # greater
1490 0x003F, // 3F # QUESTION MARK # question
1491 0x0040, // 40 # COMMERCIAL AT # at
1492 0x0041, // 41 # LATIN CAPITAL LETTER A # A
1493 0x0042, // 42 # LATIN CAPITAL LETTER B # B
1494 0x0043, // 43 # LATIN CAPITAL LETTER C # C
1495 0x0044, // 44 # LATIN CAPITAL LETTER D # D
1496 0x0045, // 45 # LATIN CAPITAL LETTER E # E
1497 0x0046, // 46 # LATIN CAPITAL LETTER F # F
1498 0x0047, // 47 # LATIN CAPITAL LETTER G # G
1499 0x0048, // 48 # LATIN CAPITAL LETTER H # H
1500 0x0049, // 49 # LATIN CAPITAL LETTER I # I
1501 0x004A, // 4A # LATIN CAPITAL LETTER J # J
1502 0x004B, // 4B # LATIN CAPITAL LETTER K # K
1503 0x004C, // 4C # LATIN CAPITAL LETTER L # L
1504 0x004D, // 4D # LATIN CAPITAL LETTER M # M
1505 0x004E, // 4E # LATIN CAPITAL LETTER N # N
1506 0x004F, // 4F # LATIN CAPITAL LETTER O # O
1507 0x0050, // 50 # LATIN CAPITAL LETTER P # P
1508 0x0051, // 51 # LATIN CAPITAL LETTER Q # Q
1509 0x0052, // 52 # LATIN CAPITAL LETTER R # R
1510 0x0053, // 53 # LATIN CAPITAL LETTER S # S
1511 0x0054, // 54 # LATIN CAPITAL LETTER T # T
1512 0x0055, // 55 # LATIN CAPITAL LETTER U # U
1513 0x0056, // 56 # LATIN CAPITAL LETTER V # V
1514 0x0057, // 57 # LATIN CAPITAL LETTER W # W
1515 0x0058, // 58 # LATIN CAPITAL LETTER X # X
1516 0x0059, // 59 # LATIN CAPITAL LETTER Y # Y
1517 0x005A, // 5A # LATIN CAPITAL LETTER Z # Z
1518 0x005B, // 5B # LEFT SQUARE BRACKET # bracketleft
1519 0x005C, // 5C # REVERSE SOLIDUS # backslash
1520 0x005D, // 5D # RIGHT SQUARE BRACKET # bracketright
1521 0x005E, // 5E # CIRCUMFLEX ACCENT # asciicircum
1522 0x005F, // 5F # LOW LINE # underscore
1523 #if 1
1524 0x0060, // 60 # GRAVE ACCENT
1525 #else
1526 // OC 13.08.2010: See http://unicode.org/Public/MAPPINGS/VENDORS/ADOBE/stdenc.txt
1527 // The following unicode char should be encoded here.
1528 // But i keep the identity ascii 7bit sign.
1529 0x2018, // 60 # LEFT SINGLE QUOTATION MARK # quoteleft
1530 #endif
1531 0x0061, // 61 # LATIN SMALL LETTER A # a
1532 0x0062, // 62 # LATIN SMALL LETTER B # b
1533 0x0063, // 63 # LATIN SMALL LETTER C # c
1534 0x0064, // 64 # LATIN SMALL LETTER D # d
1535 0x0065, // 65 # LATIN SMALL LETTER E # e
1536 0x0066, // 66 # LATIN SMALL LETTER F # f
1537 0x0067, // 67 # LATIN SMALL LETTER G # g
1538 0x0068, // 68 # LATIN SMALL LETTER H # h
1539 0x0069, // 69 # LATIN SMALL LETTER I # i
1540 0x006A, // 6A # LATIN SMALL LETTER J # j
1541 0x006B, // 6B # LATIN SMALL LETTER K # k
1542 0x006C, // 6C # LATIN SMALL LETTER L # l
1543 0x006D, // 6D # LATIN SMALL LETTER M # m
1544 0x006E, // 6E # LATIN SMALL LETTER N # n
1545 0x006F, // 6F # LATIN SMALL LETTER O # o
1546 0x0070, // 70 # LATIN SMALL LETTER P # p
1547 0x0071, // 71 # LATIN SMALL LETTER Q # q
1548 0x0072, // 72 # LATIN SMALL LETTER R # r
1549 0x0073, // 73 # LATIN SMALL LETTER S # s
1550 0x0074, // 74 # LATIN SMALL LETTER T # t
1551 0x0075, // 75 # LATIN SMALL LETTER U # u
1552 0x0076, // 76 # LATIN SMALL LETTER V # v
1553 0x0077, // 77 # LATIN SMALL LETTER W # w
1554 0x0078, // 78 # LATIN SMALL LETTER X # x
1555 0x0079, // 79 # LATIN SMALL LETTER Y # y
1556 0x007A, // 7A # LATIN SMALL LETTER Z # z
1557 0x007B, // 7B # LEFT CURLY BRACKET # braceleft
1558 0x007C, // 7C # VERTICAL LINE # bar
1559 0x007D, // 7D # RIGHT CURLY BRACKET # braceright
1560 0x007E, // 7E # TILDE # asciitilde
1561
1562 // 0x7f..0xA0 undefined:
1563 0x0000,
1564 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1565 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1566 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1567 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1568 0x0000,
1569
1570 0x00A1, // A1 # INVERTED EXCLAMATION MARK # exclamdown
1571 0x00A2, // A2 # CENT SIGN # cent
1572 0x00A3, // A3 # POUND SIGN # sterling
1573 0x2044, // A4 # FRACTION SLASH # fraction
1574 // Duplicated char, commented out
1575 // 0x2215, // A4 # DIVISION SLASH # fraction
1576 0x00A5, // A5 # YEN SIGN # yen
1577 0x0192, // A6 # LATIN SMALL LETTER F WITH HOOK # florin
1578 0x00A7, // A7 # SECTION SIGN # section
1579 0x00A4, // A8 # CURRENCY SIGN # currency
1580 0x0027, // A9 # APOSTROPHE # quotesingle
1581 0x201C, // AA # LEFT DOUBLE QUOTATION MARK # quotedblleft
1582 0x00AB, // AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK # guillemotleft
1583 0x2039, // AC # SINGLE LEFT-POINTING ANGLE QUOTATION MARK # guilsinglleft
1584 0x203A, // AD # SINGLE RIGHT-POINTING ANGLE QUOTATION MARK # guilsinglright
1585 0xFB01, // AE # LATIN SMALL LIGATURE FI # fi
1586 0xFB02, // AF # LATIN SMALL LIGATURE FL # fl
1587 0x0000, // B0 undefined
1588 0x2013, // B1 # EN DASH # endash
1589 0x2020, // B2 # DAGGER # dagger
1590 0x2021, // B3 # DOUBLE DAGGER # daggerdbl
1591 0x00B7, // B4 # MIDDLE DOT # periodcentered
1592 // 0x2219, // B4 # BULLET OPERATOR # periodcentered
1593 0x0000, // B5 undefined
1594 0x00B6, // B6 # PILCROW SIGN # paragraph
1595 0x2022, // B7 # BULLET # bullet
1596 0x201A, // B8 # SINGLE LOW-9 QUOTATION MARK # quotesinglbase
1597 0x201E, // B9 # DOUBLE LOW-9 QUOTATION MARK # quotedblbase
1598 0x201D, // BA # RIGHT DOUBLE QUOTATION MARK # quotedblright
1599 0x00BB, // BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK # guillemotright
1600 0x2026, // BC # HORIZONTAL ELLIPSIS # ellipsis
1601 0x2030, // BD # PER MILLE SIGN # perthousand
1602 0x0000, // BE undefined
1603 0x00BF, // BF # INVERTED QUESTION MARK # questiondown
1604 0x0000, // C0 undefined
1605 0x0060, // C1 # GRAVE ACCENT # grave
1606 0x00B4, // C2 # ACUTE ACCENT # acute
1607 0x02C6, // C3 # MODIFIER LETTER CIRCUMFLEX ACCENT # circumflex
1608 0x02DC, // C4 # SMALL TILDE # tilde
1609 0x00AF, // C5 # MACRON # macron
1610 // Duplicated char, commented out
1611 //0x02C9, // C5 # MODIFIER LETTER MACRON # macron
1612 0x02D8, // C6 # BREVE # breve
1613 0x02D9, // C7 # DOT ABOVE # dotaccent
1614 0x00A8, // C8 # DIAERESIS # dieresis
1615 0x0000, // C9 undefined
1616 0x02DA, // CA # RING ABOVE # ring
1617 0x00B8, // CB # CEDILLA # cedilla
1618 0x0000, // CC undefined
1619 0x02DD, // CD # DOUBLE ACUTE ACCENT # hungarumlaut
1620 0x02DB, // CE # OGONEK # ogonek
1621 0x02C7, // CF # CARON # caron
1622 0x2014, // D0 # EM DASH # emdash
1623 0x0000, // D1 undefined
1624 0x0000, // D2 undefined
1625 0x0000, // D3 undefined
1626 0x0000, // D4 undefined
1627 0x0000, // D5 undefined
1628 0x0000, // D6 undefined
1629 0x0000, // D7 undefined
1630 0x0000, // D8 undefined
1631 0x0000, // D9 undefined
1632 0x0000, // DA undefined
1633 0x0000, // DB undefined
1634 0x0000, // DC undefined
1635 0x0000, // DD undefined
1636 0x0000, // DE undefined
1637 0x0000, // DF undefined
1638 0x0000, // E0 undefined
1639 0x00C6, // E1 # LATIN CAPITAL LETTER AE # AE
1640 0x0000, // E2 undefined
1641 0x00AA, // E3 # FEMININE ORDINAL INDICATOR # ordfeminine
1642 0x0000, // E4 undefined
1643 0x0000, // E5 undefined
1644 0x0000, // E6 undefined
1645 0x0000, // E7 undefined
1646 0x0141, // E8 # LATIN CAPITAL LETTER L WITH STROKE # Lslash
1647 0x00D8, // E9 # LATIN CAPITAL LETTER O WITH STROKE # Oslash
1648 0x0152, // EA # LATIN CAPITAL LIGATURE OE # OE
1649 0x00BA, // EB # MASCULINE ORDINAL INDICATOR # ordmasculine
1650 0x0000, // EC undefined
1651 0x0000, // ED undefined
1652 0x0000, // EE undefined
1653 0x0000, // EF undefined
1654 0x0000, // F0 undefined
1655 0x00E6, // F1 # LATIN SMALL LETTER AE # ae
1656 0x0000, // F2 undefined
1657 0x0000, // F3 undefined
1658 0x0000, // F4 undefined
1659 0x0131, // F5 # LATIN SMALL LETTER DOTLESS I # dotlessi
1660 0x0000, // F6 undefined
1661 0x0000, // F7 undefined
1662 0x0142, // F8 # LATIN SMALL LETTER L WITH STROKE # lslash
1663 0x00F8, // F9 # LATIN SMALL LETTER O WITH STROKE # oslash
1664 0x0153, // FA # LATIN SMALL LIGATURE OE # oe
1665 0x00DF, // FB # LATIN SMALL LETTER SHARP S # germandbls
1666 0x0000, // FC undefined
1667 0x0000, // FD undefined
1668 0x0000, // FE undefined
1669 0x0000 // FF undefined
1670 };
1671
1672 // OC 13.08.2010 New: PdfSymbolEncoding
1673 // -----------------------------------------------------
1674 // PdfSymbolEncoding
1675 // See: http://unicode.org/Public/MAPPINGS/VENDORS/ADOBE/symbol.txt
1676 // -----------------------------------------------------
1677
1678 // -----------------------------------------------------
1679 //
1680 // -----------------------------------------------------
GetToUnicodeTable() const1681 const pdf_utf16be* PdfSymbolEncoding::GetToUnicodeTable() const
1682 {
1683 return PdfSymbolEncoding::s_cEncoding;
1684 }
1685
1686 const pdf_utf16be PdfSymbolEncoding::s_cEncoding[256] = {
1687 //0, // uncomment to check compiler error cause of 257 members
1688 // 0x00..0x1f undefined:
1689 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1690 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1691 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1692 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1693 0x0020, // 20 # SPACE # space
1694 // 0x00A0, // 20 # NO-BREAK SPACE # space
1695 0x0021, // 21 # EXCLAMATION MARK # exclam
1696 0x2200, // 22 # FOR ALL # universal
1697 0x0023, // 23 # NUMBER SIGN # numbersign
1698 0x2203, // 24 # THERE EXISTS # existential
1699 0x0025, // 25 # PERCENT SIGN # percent
1700 0x0026, // 26 # AMPERSAND # ampersand
1701 0x220B, // 27 # CONTAINS AS MEMBER # suchthat
1702 0x0028, // 28 # LEFT PARENTHESIS # parenleft
1703 0x0029, // 29 # RIGHT PARENTHESIS # parenright
1704 0x2217, // 2A # ASTERISK OPERATOR # asteriskmath
1705 0x002B, // 2B # PLUS SIGN # plus
1706 0x002C, // 2C # COMMA # comma
1707 0x2212, // 2D # MINUS SIGN # minus
1708 0x002E, // 2E # FULL STOP # period
1709 0x002F, // 2F # SOLIDUS # slash
1710 0x0030, // 30 # DIGIT ZERO # zero
1711 0x0031, // 31 # DIGIT ONE # one
1712 0x0032, // 32 # DIGIT TWO # two
1713 0x0033, // 33 # DIGIT THREE # three
1714 0x0034, // 34 # DIGIT FOUR # four
1715 0x0035, // 35 # DIGIT FIVE # five
1716 0x0036, // 36 # DIGIT SIX # six
1717 0x0037, // 37 # DIGIT SEVEN # seven
1718 0x0038, // 38 # DIGIT EIGHT # eight
1719 0x0039, // 39 # DIGIT NINE # nine
1720 0x003A, // 3A # COLON # colon
1721 0x003B, // 3B # SEMICOLON # semicolon
1722 0x003C, // 3C # LESS-THAN SIGN # less
1723 0x003D, // 3D # EQUALS SIGN # equal
1724 0x003E, // 3E # GREATER-THAN SIGN # greater
1725 0x003F, // 3F # QUESTION MARK # question
1726 0x2245, // 40 # APPROXIMATELY EQUAL TO # congruent
1727 0x0391, // 41 # GREEK CAPITAL LETTER ALPHA # Alpha
1728 0x0392, // 42 # GREEK CAPITAL LETTER BETA # Beta
1729 0x03A7, // 43 # GREEK CAPITAL LETTER CHI # Chi
1730 0x0394, // 44 # GREEK CAPITAL LETTER DELTA # Delta
1731 // 0x2206, // 44 # INCREMENT # Delta
1732 0x0395, // 45 # GREEK CAPITAL LETTER EPSILON # Epsilon
1733 0x03A6, // 46 # GREEK CAPITAL LETTER PHI # Phi
1734 0x0393, // 47 # GREEK CAPITAL LETTER GAMMA # Gamma
1735 0x0397, // 48 # GREEK CAPITAL LETTER ETA # Eta
1736 0x0399, // 49 # GREEK CAPITAL LETTER IOTA # Iota
1737 0x03D1, // 4A # GREEK THETA SYMBOL # theta1
1738 0x039A, // 4B # GREEK CAPITAL LETTER KAPPA # Kappa
1739 0x039B, // 4C # GREEK CAPITAL LETTER LAMDA # Lambda
1740 0x039C, // 4D # GREEK CAPITAL LETTER MU # Mu
1741 0x039D, // 4E # GREEK CAPITAL LETTER NU # Nu
1742 0x039F, // 4F # GREEK CAPITAL LETTER OMICRON # Omicron
1743 0x03A0, // 50 # GREEK CAPITAL LETTER PI # Pi
1744 0x0398, // 51 # GREEK CAPITAL LETTER THETA # Theta
1745 0x03A1, // 52 # GREEK CAPITAL LETTER RHO # Rho
1746 0x03A3, // 53 # GREEK CAPITAL LETTER SIGMA # Sigma
1747 0x03A4, // 54 # GREEK CAPITAL LETTER TAU # Tau
1748 0x03A5, // 55 # GREEK CAPITAL LETTER UPSILON # Upsilon
1749 0x03C2, // 56 # GREEK SMALL LETTER FINAL SIGMA # sigma1
1750 0x03A9, // 57 # GREEK CAPITAL LETTER OMEGA # Omega
1751 // 0x2126, // 57 # OHM SIGN # Omega
1752 0x039E, // 58 # GREEK CAPITAL LETTER XI # Xi
1753 0x03A8, // 59 # GREEK CAPITAL LETTER PSI # Psi
1754 0x0396, // 5A # GREEK CAPITAL LETTER ZETA # Zeta
1755 0x005B, // 5B # LEFT SQUARE BRACKET # bracketleft
1756 0x2234, // 5C # THEREFORE # therefore
1757 0x005D, // 5D # RIGHT SQUARE BRACKET # bracketright
1758 0x22A5, // 5E # UP TACK # perpendicular
1759 0x005F, // 5F # LOW LINE # underscore
1760 0xF8E5, // 60 # RADICAL EXTENDER # radicalex (CUS)
1761 0x03B1, // 61 # GREEK SMALL LETTER ALPHA # alpha
1762 0x03B2, // 62 # GREEK SMALL LETTER BETA # beta
1763 0x03C7, // 63 # GREEK SMALL LETTER CHI # chi
1764 0x03B4, // 64 # GREEK SMALL LETTER DELTA # delta
1765 0x03B5, // 65 # GREEK SMALL LETTER EPSILON # epsilon
1766 0x03C6, // 66 # GREEK SMALL LETTER PHI # phi
1767 0x03B3, // 67 # GREEK SMALL LETTER GAMMA # gamma
1768 0x03B7, // 68 # GREEK SMALL LETTER ETA # eta
1769 0x03B9, // 69 # GREEK SMALL LETTER IOTA # iota
1770 0x03D5, // 6A # GREEK PHI SYMBOL # phi1
1771 0x03BA, // 6B # GREEK SMALL LETTER KAPPA # kappa
1772 0x03BB, // 6C # GREEK SMALL LETTER LAMDA # lambda
1773 // 0x00B5, // 6D # MICRO SIGN # mu
1774 0x03BC, // 6D # GREEK SMALL LETTER MU # mu
1775 0x03BD, // 6E # GREEK SMALL LETTER NU # nu
1776 0x03BF, // 6F # GREEK SMALL LETTER OMICRON # omicron
1777 0x03C0, // 70 # GREEK SMALL LETTER PI # pi
1778 0x03B8, // 71 # GREEK SMALL LETTER THETA # theta
1779 0x03C1, // 72 # GREEK SMALL LETTER RHO # rho
1780 0x03C3, // 73 # GREEK SMALL LETTER SIGMA # sigma
1781 0x03C4, // 74 # GREEK SMALL LETTER TAU # tau
1782 0x03C5, // 75 # GREEK SMALL LETTER UPSILON # upsilon
1783 0x03D6, // 76 # GREEK PI SYMBOL # omega1
1784 0x03C9, // 77 # GREEK SMALL LETTER OMEGA # omega
1785 0x03BE, // 78 # GREEK SMALL LETTER XI # xi
1786 0x03C8, // 79 # GREEK SMALL LETTER PSI # psi
1787 0x03B6, // 7A # GREEK SMALL LETTER ZETA # zeta
1788 0x007B, // 7B # LEFT CURLY BRACKET # braceleft
1789 0x007C, // 7C # VERTICAL LINE # bar
1790 0x007D, // 7D # RIGHT CURLY BRACKET # braceright
1791 0x223C, // 7E # TILDE OPERATOR # similar
1792
1793 // 0x7f..0x9F undefined:
1794 0x0000,
1795 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1796 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1797 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1798 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1799
1800 0x20AC, // A0 # EURO SIGN # Euro
1801 0x03D2, // A1 # GREEK UPSILON WITH HOOK SYMBOL # Upsilon1
1802 0x2032, // A2 # PRIME # minute
1803 0x2264, // A3 # LESS-THAN OR EQUAL TO # lessequal
1804 0x2044, // A4 # FRACTION SLASH # fraction
1805 // 0x2215, // A4 # DIVISION SLASH # fraction
1806 0x221E, // A5 # INFINITY # infinity
1807 0x0192, // A6 # LATIN SMALL LETTER F WITH HOOK # florin
1808 0x2663, // A7 # BLACK CLUB SUIT # club
1809 0x2666, // A8 # BLACK DIAMOND SUIT # diamond
1810 0x2665, // A9 # BLACK HEART SUIT # heart
1811 0x2660, // AA # BLACK SPADE SUIT # spade
1812 0x2194, // AB # LEFT RIGHT ARROW # arrowboth
1813 0x2190, // AC # LEFTWARDS ARROW # arrowleft
1814 0x2191, // AD # UPWARDS ARROW # arrowup
1815 0x2192, // AE # RIGHTWARDS ARROW # arrowright
1816 0x2193, // AF # DOWNWARDS ARROW # arrowdown
1817 0x00B0, // B0 # DEGREE SIGN # degree
1818 0x00B1, // B1 # PLUS-MINUS SIGN # plusminus
1819 0x2033, // B2 # DOUBLE PRIME # second
1820 0x2265, // B3 # GREATER-THAN OR EQUAL TO # greaterequal
1821 0x00D7, // B4 # MULTIPLICATION SIGN # multiply
1822 0x221D, // B5 # PROPORTIONAL TO # proportional
1823 0x2202, // B6 # PARTIAL DIFFERENTIAL # partialdiff
1824 0x2022, // B7 # BULLET # bullet
1825 0x00F7, // B8 # DIVISION SIGN # divide
1826 0x2260, // B9 # NOT EQUAL TO # notequal
1827 0x2261, // BA # IDENTICAL TO # equivalence
1828 0x2248, // BB # ALMOST EQUAL TO # approxequal
1829 0x2026, // BC # HORIZONTAL ELLIPSIS # ellipsis
1830 0xF8E6, // BD # VERTICAL ARROW EXTENDER # arrowvertex (CUS)
1831 0xF8E7, // BE # HORIZONTAL ARROW EXTENDER # arrowhorizex (CUS)
1832 0x21B5, // BF # DOWNWARDS ARROW WITH CORNER LEFTWARDS # carriagereturn
1833 0x2135, // C0 # ALEF SYMBOL # aleph
1834 0x2111, // C1 # BLACK-LETTER CAPITAL I # Ifraktur
1835 0x211C, // C2 # BLACK-LETTER CAPITAL R # Rfraktur
1836 0x2118, // C3 # SCRIPT CAPITAL P # weierstrass
1837 0x2297, // C4 # CIRCLED TIMES # circlemultiply
1838 0x2295, // C5 # CIRCLED PLUS # circleplus
1839 0x2205, // C6 # EMPTY SET # emptyset
1840 0x2229, // C7 # INTERSECTION # intersection
1841 0x222A, // C8 # UNION # union
1842 0x2283, // C9 # SUPERSET OF # propersuperset
1843 0x2287, // CA # SUPERSET OF OR EQUAL TO # reflexsuperset
1844 0x2284, // CB # NOT A SUBSET OF # notsubset
1845 0x2282, // CC # SUBSET OF # propersubset
1846 0x2286, // CD # SUBSET OF OR EQUAL TO # reflexsubset
1847 0x2208, // CE # ELEMENT OF # element
1848 0x2209, // CF # NOT AN ELEMENT OF # notelement
1849 0x2220, // D0 # ANGLE # angle
1850 0x2207, // D1 # NABLA # gradient
1851 0xF6DA, // D2 # REGISTERED SIGN SERIF # registerserif (CUS)
1852 0xF6D9, // D3 # COPYRIGHT SIGN SERIF # copyrightserif (CUS)
1853 0xF6DB, // D4 # TRADE MARK SIGN SERIF # trademarkserif (CUS)
1854 0x220F, // D5 # N-ARY PRODUCT # product
1855 0x221A, // D6 # SQUARE ROOT # radical
1856 0x22C5, // D7 # DOT OPERATOR # dotmath
1857 0x00AC, // D8 # NOT SIGN # logicalnot
1858 0x2227, // D9 # LOGICAL AND # logicaland
1859 0x2228, // DA # LOGICAL OR # logicalor
1860 0x21D4, // DB # LEFT RIGHT DOUBLE ARROW # arrowdblboth
1861 0x21D0, // DC # LEFTWARDS DOUBLE ARROW # arrowdblleft
1862 0x21D1, // DD # UPWARDS DOUBLE ARROW # arrowdblup
1863 0x21D2, // DE # RIGHTWARDS DOUBLE ARROW # arrowdblright
1864 0x21D3, // DF # DOWNWARDS DOUBLE ARROW # arrowdbldown
1865 0x25CA, // E0 # LOZENGE # lozenge
1866 0x2329, // E1 # LEFT-POINTING ANGLE BRACKET # angleleft
1867 0xF8E8, // E2 # REGISTERED SIGN SANS SERIF # registersans (CUS)
1868 0xF8E9, // E3 # COPYRIGHT SIGN SANS SERIF # copyrightsans (CUS)
1869 0xF8EA, // E4 # TRADE MARK SIGN SANS SERIF # trademarksans (CUS)
1870 0x2211, // E5 # N-ARY SUMMATION # summation
1871 0xF8EB, // E6 # LEFT PAREN TOP # parenlefttp (CUS)
1872 0xF8EC, // E7 # LEFT PAREN EXTENDER # parenleftex (CUS)
1873 0xF8ED, // E8 # LEFT PAREN BOTTOM # parenleftbt (CUS)
1874 0xF8EE, // E9 # LEFT SQUARE BRACKET TOP # bracketlefttp (CUS)
1875 0xF8EF, // EA # LEFT SQUARE BRACKET EXTENDER # bracketleftex (CUS)
1876 0xF8F0, // EB # LEFT SQUARE BRACKET BOTTOM # bracketleftbt (CUS)
1877 0xF8F1, // EC # LEFT CURLY BRACKET TOP # bracelefttp (CUS)
1878 0xF8F2, // ED # LEFT CURLY BRACKET MID # braceleftmid (CUS)
1879 0xF8F3, // EE # LEFT CURLY BRACKET BOTTOM # braceleftbt (CUS)
1880 0xF8F4, // EF # CURLY BRACKET EXTENDER # braceex (CUS)
1881 0x0000, // F0 undefined
1882 0x232A, // F1 # RIGHT-POINTING ANGLE BRACKET # angleright
1883 0x222B, // F2 # INTEGRAL # integral
1884 0x2320, // F3 # TOP HALF INTEGRAL # integraltp
1885 0xF8F5, // F4 # INTEGRAL EXTENDER # integralex (CUS)
1886 0x2321, // F5 # BOTTOM HALF INTEGRAL # integralbt
1887 0xF8F6, // F6 # RIGHT PAREN TOP # parenrighttp (CUS)
1888 0xF8F7, // F7 # RIGHT PAREN EXTENDER # parenrightex (CUS)
1889 0xF8F8, // F8 # RIGHT PAREN BOTTOM # parenrightbt (CUS)
1890 0xF8F9, // F9 # RIGHT SQUARE BRACKET TOP # bracketrighttp (CUS)
1891 0xF8FA, // FA # RIGHT SQUARE BRACKET EXTENDER # bracketrightex (CUS)
1892 0xF8FB, // FB # RIGHT SQUARE BRACKET BOTTOM # bracketrightbt (CUS)
1893 0xF8FC, // FC # RIGHT CURLY BRACKET TOP # bracerighttp (CUS)
1894 0xF8FD, // FD # RIGHT CURLY BRACKET MID # bracerightmid (CUS)
1895 0xF8FE, // FE # RIGHT CURLY BRACKET BOTTOM # bracerightbt (CUS)
1896 0x0000 // FF undefined
1897 };
1898
1899 // OC 13.08.2010 New: PdfZapfDingbatsEncoding
1900 // -----------------------------------------------------
1901 // PdfZapfDingbatsEncoding
1902 // See: http://unicode.org/Public/MAPPINGS/VENDORS/ADOBE/zdingbat.txt
1903 // -----------------------------------------------------
1904
1905 // -----------------------------------------------------
1906 //
1907 // -----------------------------------------------------
GetToUnicodeTable() const1908 const pdf_utf16be* PdfZapfDingbatsEncoding::GetToUnicodeTable() const
1909 {
1910 return PdfZapfDingbatsEncoding::s_cEncoding;
1911 }
1912
1913 const pdf_utf16be PdfZapfDingbatsEncoding::s_cEncoding[256] = {
1914 //0, // uncomment to check compiler error cause of 257 members
1915 // 0x00..0x1f undefined:
1916 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1917 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1918 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1919 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1920 0x0020, // 20 # SPACE # space
1921 // 0x00A0, // 20 # NO-BREAK SPACE # space
1922 0x2701, // 21 # UPPER BLADE SCISSORS # a1
1923 0x2702, // 22 # BLACK SCISSORS # a2
1924 0x2703, // 23 # LOWER BLADE SCISSORS # a202
1925 0x2704, // 24 # WHITE SCISSORS # a3
1926 0x260E, // 25 # BLACK TELEPHONE # a4
1927 0x2706, // 26 # TELEPHONE LOCATION SIGN # a5
1928 0x2707, // 27 # TAPE DRIVE # a119
1929 0x2708, // 28 # AIRPLANE # a118
1930 0x2709, // 29 # ENVELOPE # a117
1931 0x261B, // 2A # BLACK RIGHT POINTING INDEX # a11
1932 0x261E, // 2B # WHITE RIGHT POINTING INDEX # a12
1933 0x270C, // 2C # VICTORY HAND # a13
1934 0x270D, // 2D # WRITING HAND # a14
1935 0x270E, // 2E # LOWER RIGHT PENCIL # a15
1936 0x270F, // 2F # PENCIL # a16
1937 0x2710, // 30 # UPPER RIGHT PENCIL # a105
1938 0x2711, // 31 # WHITE NIB # a17
1939 0x2712, // 32 # BLACK NIB # a18
1940 0x2713, // 33 # CHECK MARK # a19
1941 0x2714, // 34 # HEAVY CHECK MARK # a20
1942 0x2715, // 35 # MULTIPLICATION X # a21
1943 0x2716, // 36 # HEAVY MULTIPLICATION X # a22
1944 0x2717, // 37 # BALLOT X # a23
1945 0x2718, // 38 # HEAVY BALLOT X # a24
1946 0x2719, // 39 # OUTLINED GREEK CROSS # a25
1947 0x271A, // 3A # HEAVY GREEK CROSS # a26
1948 0x271B, // 3B # OPEN CENTRE CROSS # a27
1949 0x271C, // 3C # HEAVY OPEN CENTRE CROSS # a28
1950 0x271D, // 3D # LATIN CROSS # a6
1951 0x271E, // 3E # SHADOWED WHITE LATIN CROSS # a7
1952 0x271F, // 3F # OUTLINED LATIN CROSS # a8
1953 0x2720, // 40 # MALTESE CROSS # a9
1954 0x2721, // 41 # STAR OF DAVID # a10
1955 0x2722, // 42 # FOUR TEARDROP-SPOKED ASTERISK # a29
1956 0x2723, // 43 # FOUR BALLOON-SPOKED ASTERISK # a30
1957 0x2724, // 44 # HEAVY FOUR BALLOON-SPOKED ASTERISK # a31
1958 0x2725, // 45 # FOUR CLUB-SPOKED ASTERISK # a32
1959 0x2726, // 46 # BLACK FOUR POINTED STAR # a33
1960 0x2727, // 47 # WHITE FOUR POINTED STAR # a34
1961 0x2605, // 48 # BLACK STAR # a35
1962 0x2729, // 49 # STRESS OUTLINED WHITE STAR # a36
1963 0x272A, // 4A # CIRCLED WHITE STAR # a37
1964 0x272B, // 4B # OPEN CENTRE BLACK STAR # a38
1965 0x272C, // 4C # BLACK CENTRE WHITE STAR # a39
1966 0x272D, // 4D # OUTLINED BLACK STAR # a40
1967 0x272E, // 4E # HEAVY OUTLINED BLACK STAR # a41
1968 0x272F, // 4F # PINWHEEL STAR # a42
1969 0x2730, // 50 # SHADOWED WHITE STAR # a43
1970 0x2731, // 51 # HEAVY ASTERISK # a44
1971 0x2732, // 52 # OPEN CENTRE ASTERISK # a45
1972 0x2733, // 53 # EIGHT SPOKED ASTERISK # a46
1973 0x2734, // 54 # EIGHT POINTED BLACK STAR # a47
1974 0x2735, // 55 # EIGHT POINTED PINWHEEL STAR # a48
1975 0x2736, // 56 # SIX POINTED BLACK STAR # a49
1976 0x2737, // 57 # EIGHT POINTED RECTILINEAR BLACK STAR # a50
1977 0x2738, // 58 # HEAVY EIGHT POINTED RECTILINEAR BLACK STAR # a51
1978 0x2739, // 59 # TWELVE POINTED BLACK STAR # a52
1979 0x273A, // 5A # SIXTEEN POINTED ASTERISK # a53
1980 0x273B, // 5B # TEARDROP-SPOKED ASTERISK # a54
1981 0x273C, // 5C # OPEN CENTRE TEARDROP-SPOKED ASTERISK # a55
1982 0x273D, // 5D # HEAVY TEARDROP-SPOKED ASTERISK # a56
1983 0x273E, // 5E # SIX PETALLED BLACK AND WHITE FLORETTE # a57
1984 0x273F, // 5F # BLACK FLORETTE # a58
1985 0x2740, // 60 # WHITE FLORETTE # a59
1986 0x2741, // 61 # EIGHT PETALLED OUTLINED BLACK FLORETTE # a60
1987 0x2742, // 62 # CIRCLED OPEN CENTRE EIGHT POINTED STAR # a61
1988 0x2743, // 63 # HEAVY TEARDROP-SPOKED PINWHEEL ASTERISK # a62
1989 0x2744, // 64 # SNOWFLAKE # a63
1990 0x2745, // 65 # TIGHT TRIFOLIATE SNOWFLAKE # a64
1991 0x2746, // 66 # HEAVY CHEVRON SNOWFLAKE # a65
1992 0x2747, // 67 # SPARKLE # a66
1993 0x2748, // 68 # HEAVY SPARKLE # a67
1994 0x2749, // 69 # BALLOON-SPOKED ASTERISK # a68
1995 0x274A, // 6A # EIGHT TEARDROP-SPOKED PROPELLER ASTERISK # a69
1996 0x274B, // 6B # HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK # a70
1997 0x25CF, // 6C # BLACK CIRCLE # a71
1998 0x274D, // 6D # SHADOWED WHITE CIRCLE # a72
1999 0x25A0, // 6E # BLACK SQUARE # a73
2000 0x274F, // 6F # LOWER RIGHT DROP-SHADOWED WHITE SQUARE # a74
2001 0x2750, // 70 # UPPER RIGHT DROP-SHADOWED WHITE SQUARE # a203
2002 0x2751, // 71 # LOWER RIGHT SHADOWED WHITE SQUARE # a75
2003 0x2752, // 72 # UPPER RIGHT SHADOWED WHITE SQUARE # a204
2004 0x25B2, // 73 # BLACK UP-POINTING TRIANGLE # a76
2005 0x25BC, // 74 # BLACK DOWN-POINTING TRIANGLE # a77
2006 0x25C6, // 75 # BLACK DIAMOND # a78
2007 0x2756, // 76 # BLACK DIAMOND MINUS WHITE X # a79
2008 0x25D7, // 77 # RIGHT HALF BLACK CIRCLE # a81
2009 0x2758, // 78 # LIGHT VERTICAL BAR # a82
2010 0x2759, // 79 # MEDIUM VERTICAL BAR # a83
2011 0x275A, // 7A # HEAVY VERTICAL BAR # a84
2012 0x275B, // 7B # HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT # a97
2013 0x275C, // 7C # HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT # a98
2014 0x275D, // 7D # HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT # a99
2015 0x275E, // 7E # HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT # a100
2016 0x0000, // 7F undefined
2017 0xF8D7, // 80 # MEDIUM LEFT PARENTHESIS ORNAMENT # a89 (CUS)
2018 0xF8D8, // 81 # MEDIUM RIGHT PARENTHESIS ORNAMENT # a90 (CUS)
2019 0xF8D9, // 82 # MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT # a93 (CUS)
2020 0xF8DA, // 83 # MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT # a94 (CUS)
2021 0xF8DB, // 84 # MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT # a91 (CUS)
2022 0xF8DC, // 85 # MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT # a92 (CUS)
2023 0xF8DD, // 86 # HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT # a205 (CUS)
2024 0xF8DE, // 87 # HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT # a85 (CUS)
2025 0xF8DF, // 88 # HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT # a206 (CUS)
2026 0xF8E0, // 89 # HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT # a86 (CUS)
2027 0xF8E1, // 8A # LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT # a87 (CUS)
2028 0xF8E2, // 8B # LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT # a88 (CUS)
2029 0xF8E3, // 8C # MEDIUM LEFT CURLY BRACKET ORNAMENT # a95 (CUS)
2030 0xF8E4, // 8D # MEDIUM RIGHT CURLY BRACKET ORNAMENT # a96 (CUS)
2031
2032 // 0x8E..0xA0 undefined:
2033 0x0000, 0x0000,
2034 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2035 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2036 0x0000,
2037
2038 0x2761, // A1 # CURVED STEM PARAGRAPH SIGN ORNAMENT # a101
2039 0x2762, // A2 # HEAVY EXCLAMATION MARK ORNAMENT # a102
2040 0x2763, // A3 # HEAVY HEART EXCLAMATION MARK ORNAMENT # a103
2041 0x2764, // A4 # HEAVY BLACK HEART # a104
2042 0x2765, // A5 # ROTATED HEAVY BLACK HEART BULLET # a106
2043 0x2766, // A6 # FLORAL HEART # a107
2044 0x2767, // A7 # ROTATED FLORAL HEART BULLET # a108
2045 0x2663, // A8 # BLACK CLUB SUIT # a112
2046 0x2666, // A9 # BLACK DIAMOND SUIT # a111
2047 0x2665, // AA # BLACK HEART SUIT # a110
2048 0x2660, // AB # BLACK SPADE SUIT # a109
2049 0x2460, // AC # CIRCLED DIGIT ONE # a120
2050 0x2461, // AD # CIRCLED DIGIT TWO # a121
2051 0x2462, // AE # CIRCLED DIGIT THREE # a122
2052 0x2463, // AF # CIRCLED DIGIT FOUR # a123
2053 0x2464, // B0 # CIRCLED DIGIT FIVE # a124
2054 0x2465, // B1 # CIRCLED DIGIT SIX # a125
2055 0x2466, // B2 # CIRCLED DIGIT SEVEN # a126
2056 0x2467, // B3 # CIRCLED DIGIT EIGHT # a127
2057 0x2468, // B4 # CIRCLED DIGIT NINE # a128
2058 0x2469, // B5 # CIRCLED NUMBER TEN # a129
2059 0x2776, // B6 # DINGBAT NEGATIVE CIRCLED DIGIT ONE # a130
2060 0x2777, // B7 # DINGBAT NEGATIVE CIRCLED DIGIT TWO # a131
2061 0x2778, // B8 # DINGBAT NEGATIVE CIRCLED DIGIT THREE # a132
2062 0x2779, // B9 # DINGBAT NEGATIVE CIRCLED DIGIT FOUR # a133
2063 0x277A, // BA # DINGBAT NEGATIVE CIRCLED DIGIT FIVE # a134
2064 0x277B, // BB # DINGBAT NEGATIVE CIRCLED DIGIT SIX # a135
2065 0x277C, // BC # DINGBAT NEGATIVE CIRCLED DIGIT SEVEN # a136
2066 0x277D, // BD # DINGBAT NEGATIVE CIRCLED DIGIT EIGHT # a137
2067 0x277E, // BE # DINGBAT NEGATIVE CIRCLED DIGIT NINE # a138
2068 0x277F, // BF # DINGBAT NEGATIVE CIRCLED NUMBER TEN # a139
2069 0x2780, // C0 # DINGBAT CIRCLED SANS-SERIF DIGIT ONE # a140
2070 0x2781, // C1 # DINGBAT CIRCLED SANS-SERIF DIGIT TWO # a141
2071 0x2782, // C2 # DINGBAT CIRCLED SANS-SERIF DIGIT THREE # a142
2072 0x2783, // C3 # DINGBAT CIRCLED SANS-SERIF DIGIT FOUR # a143
2073 0x2784, // C4 # DINGBAT CIRCLED SANS-SERIF DIGIT FIVE # a144
2074 0x2785, // C5 # DINGBAT CIRCLED SANS-SERIF DIGIT SIX # a145
2075 0x2786, // C6 # DINGBAT CIRCLED SANS-SERIF DIGIT SEVEN # a146
2076 0x2787, // C7 # DINGBAT CIRCLED SANS-SERIF DIGIT EIGHT # a147
2077 0x2788, // C8 # DINGBAT CIRCLED SANS-SERIF DIGIT NINE # a148
2078 0x2789, // C9 # DINGBAT CIRCLED SANS-SERIF NUMBER TEN # a149
2079 0x278A, // CA # DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE # a150
2080 0x278B, // CB # DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT TWO # a151
2081 0x278C, // CC # DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT THREE # a152
2082 0x278D, // CD # DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FOUR # a153
2083 0x278E, // CE # DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FIVE # a154
2084 0x278F, // CF # DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SIX # a155
2085 0x2790, // D0 # DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SEVEN # a156
2086 0x2791, // D1 # DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT EIGHT # a157
2087 0x2792, // D2 # DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT NINE # a158
2088 0x2793, // D3 # DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN # a159
2089 0x2794, // D4 # HEAVY WIDE-HEADED RIGHTWARDS ARROW # a160
2090 0x2192, // D5 # RIGHTWARDS ARROW # a161
2091 0x2194, // D6 # LEFT RIGHT ARROW # a163
2092 0x2195, // D7 # UP DOWN ARROW # a164
2093 0x2798, // D8 # HEAVY SOUTH EAST ARROW # a196
2094 0x2799, // D9 # HEAVY RIGHTWARDS ARROW # a165
2095 0x279A, // DA # HEAVY NORTH EAST ARROW # a192
2096 0x279B, // DB # DRAFTING POINT RIGHTWARDS ARROW # a166
2097 0x279C, // DC # HEAVY ROUND-TIPPED RIGHTWARDS ARROW # a167
2098 0x279D, // DD # TRIANGLE-HEADED RIGHTWARDS ARROW # a168
2099 0x279E, // DE # HEAVY TRIANGLE-HEADED RIGHTWARDS ARROW # a169
2100 0x279F, // DF # DASHED TRIANGLE-HEADED RIGHTWARDS ARROW # a170
2101 0x27A0, // E0 # HEAVY DASHED TRIANGLE-HEADED RIGHTWARDS ARROW # a171
2102 0x27A1, // E1 # BLACK RIGHTWARDS ARROW # a172
2103 0x27A2, // E2 # THREE-D TOP-LIGHTED RIGHTWARDS ARROWHEAD # a173
2104 0x27A3, // E3 # THREE-D BOTTOM-LIGHTED RIGHTWARDS ARROWHEAD # a162
2105 0x27A4, // E4 # BLACK RIGHTWARDS ARROWHEAD # a174
2106 0x27A5, // E5 # HEAVY BLACK CURVED DOWNWARDS AND RIGHTWARDS ARROW # a175
2107 0x27A6, // E6 # HEAVY BLACK CURVED UPWARDS AND RIGHTWARDS ARROW # a176
2108 0x27A7, // E7 # SQUAT BLACK RIGHTWARDS ARROW # a177
2109 0x27A8, // E8 # HEAVY CONCAVE-POINTED BLACK RIGHTWARDS ARROW # a178
2110 0x27A9, // E9 # RIGHT-SHADED WHITE RIGHTWARDS ARROW # a179
2111 0x27AA, // EA # LEFT-SHADED WHITE RIGHTWARDS ARROW # a193
2112 0x27AB, // EB # BACK-TILTED SHADOWED WHITE RIGHTWARDS ARROW # a180
2113 0x27AC, // EC # FRONT-TILTED SHADOWED WHITE RIGHTWARDS ARROW # a199
2114 0x27AD, // ED # HEAVY LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW # a181
2115 0x27AE, // EE # HEAVY UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW # a200
2116 0x27AF, // EF # NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW # a182
2117 0x0000, // F0 undefined
2118 0x27B1, // F1 # NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW # a201
2119 0x27B2, // F2 # CIRCLED HEAVY WHITE RIGHTWARDS ARROW # a183
2120 0x27B3, // F3 # WHITE-FEATHERED RIGHTWARDS ARROW # a184
2121 0x27B4, // F4 # BLACK-FEATHERED SOUTH EAST ARROW # a197
2122 0x27B5, // F5 # BLACK-FEATHERED RIGHTWARDS ARROW # a185
2123 0x27B6, // F6 # BLACK-FEATHERED NORTH EAST ARROW # a194
2124 0x27B7, // F7 # HEAVY BLACK-FEATHERED SOUTH EAST ARROW # a198
2125 0x27B8, // F8 # HEAVY BLACK-FEATHERED RIGHTWARDS ARROW # a186
2126 0x27B9, // F9 # HEAVY BLACK-FEATHERED NORTH EAST ARROW # a195
2127 0x27BA, // FA # TEARDROP-BARBED RIGHTWARDS ARROW # a187
2128 0x27BB, // FB # HEAVY TEARDROP-SHANKED RIGHTWARDS ARROW # a188
2129 0x27BC, // FC # WEDGE-TAILED RIGHTWARDS ARROW # a189
2130 0x27BD, // FD # HEAVY WEDGE-TAILED RIGHTWARDS ARROW # a190
2131 0x27BE, // FE # OPEN-OUTLINED RIGHTWARDS ARROW # a191
2132 0x0000 // FF undefined
2133 };
2134
2135 // -----------------------------------------------------
2136 // PdfWin1250Encoding
2137 // See: http://www.microsoft.com/globaldev/reference/sbcs/1250.mspx
2138 // -----------------------------------------------------
2139
2140 // -----------------------------------------------------
2141 //
2142 // -----------------------------------------------------
2143 const pdf_utf16be PdfWin1250Encoding::s_cEncoding[256] = {
2144 0x0000, // NULL
2145 0x0001, // START OF HEADING
2146 0x0002, // START OF TEXT
2147 0x0003, // END OF TEXT
2148 0x0004, // END OF TRANSMISSION
2149 0x0005, // ENQUIRY
2150 0x0006, // ACKNOWLEDGE
2151 0x0007, // BELL
2152 0x0008, // BACKSPACE
2153 0x0009, // HORIZONTAL TABULATION
2154 0x000A, // LINE FEED
2155 0x000B, // VERTICAL TABULATION
2156 0x000C, // FORM FEED
2157 0x000D, // CARRIAGE RETURN
2158 0x000E, // SHIFT OUT
2159 0x000F, // SHIFT IN
2160 0x0010, // DATA LINK ESCAPE
2161 0x0011, // DEVICE CONTROL ONE
2162 0x0012, // DEVICE CONTROL TWO
2163 0x0013, // DEVICE CONTROL THREE
2164 0x0014, // DEVICE CONTROL FOUR
2165 0x0015, // NEGATIVE ACKNOWLEDGE
2166 0x0016, // SYNCHRONOUS IDLE
2167 0x0017, // END OF TRANSMISSION BLOCK
2168 0x0018, // CANCEL
2169 0x0019, // END OF MEDIUM
2170 0x001A, // SUBSTITUTE
2171 0x001B, // ESCAPE
2172 0x001C, // FILE SEPARATOR
2173 0x001D, // GROUP SEPARATOR
2174 0x001E, // RECORD SEPARATOR
2175 0x001F, // UNIT SEPARATOR
2176 0x0020, // SPACE
2177 0x0021, // EXCLAMATION MARK
2178 0x0022, // QUOTATION MARK
2179 0x0023, // NUMBER SIGN
2180 0x0024, // DOLLAR SIGN
2181 0x0025, // PERCENT SIGN
2182 0x0026, // AMPERSAND
2183 0x0027, // APOSTROPHE
2184 0x0028, // LEFT PARENTHESIS
2185 0x0029, // RIGHT PARENTHESIS
2186 0x002A, // ASTERISK
2187 0x002B, // PLUS SIGN
2188 0x002C, // COMMA
2189 0x002D, // HYPHEN-MINUS
2190 0x002E, // FULL STOP
2191 0x002F, // SOLIDUS
2192 0x0030, // DIGIT ZERO
2193 0x0031, // DIGIT ONE
2194 0x0032, // DIGIT TWO
2195 0x0033, // DIGIT THREE
2196 0x0034, // DIGIT FOUR
2197 0x0035, // DIGIT FIVE
2198 0x0036, // DIGIT SIX
2199 0x0037, // DIGIT SEVEN
2200 0x0038, // DIGIT EIGHT
2201 0x0039, // DIGIT NINE
2202 0x003A, // COLON
2203 0x003B, // SEMICOLON
2204 0x003C, // LESS-THAN SIGN
2205 0x003D, // EQUALS SIGN
2206 0x003E, // GREATER-THAN SIGN
2207 0x003F, // QUESTION MARK
2208 0x0040, // COMMERCIAL AT
2209 0x0041, // LATIN CAPITAL LETTER A
2210 0x0042, // LATIN CAPITAL LETTER B
2211 0x0043, // LATIN CAPITAL LETTER C
2212 0x0044, // LATIN CAPITAL LETTER D
2213 0x0045, // LATIN CAPITAL LETTER E
2214 0x0046, // LATIN CAPITAL LETTER F
2215 0x0047, // LATIN CAPITAL LETTER G
2216 0x0048, // LATIN CAPITAL LETTER H
2217 0x0049, // LATIN CAPITAL LETTER I
2218 0x004A, // LATIN CAPITAL LETTER J
2219 0x004B, // LATIN CAPITAL LETTER K
2220 0x004C, // LATIN CAPITAL LETTER L
2221 0x004D, // LATIN CAPITAL LETTER M
2222 0x004E, // LATIN CAPITAL LETTER N
2223 0x004F, // LATIN CAPITAL LETTER O
2224 0x0050, // LATIN CAPITAL LETTER P
2225 0x0051, // LATIN CAPITAL LETTER Q
2226 0x0052, // LATIN CAPITAL LETTER R
2227 0x0053, // LATIN CAPITAL LETTER S
2228 0x0054, // LATIN CAPITAL LETTER T
2229 0x0055, // LATIN CAPITAL LETTER U
2230 0x0056, // LATIN CAPITAL LETTER V
2231 0x0057, // LATIN CAPITAL LETTER W
2232 0x0058, // LATIN CAPITAL LETTER X
2233 0x0059, // LATIN CAPITAL LETTER Y
2234 0x005A, // LATIN CAPITAL LETTER Z
2235 0x005B, // LEFT SQUARE BRACKET
2236 0x005C, // REVERSE SOLIDUS
2237 0x005D, // RIGHT SQUARE BRACKET
2238 0x005E, // CIRCUMFLEX ACCENT
2239 0x005F, // LOW LINE
2240 0x0060, // GRAVE ACCENT
2241 0x0061, // LATIN SMALL LETTER A
2242 0x0062, // LATIN SMALL LETTER B
2243 0x0063, // LATIN SMALL LETTER C
2244 0x0064, // LATIN SMALL LETTER D
2245 0x0065, // LATIN SMALL LETTER E
2246 0x0066, // LATIN SMALL LETTER F
2247 0x0067, // LATIN SMALL LETTER G
2248 0x0068, // LATIN SMALL LETTER H
2249 0x0069, // LATIN SMALL LETTER I
2250 0x006A, // LATIN SMALL LETTER J
2251 0x006B, // LATIN SMALL LETTER K
2252 0x006C, // LATIN SMALL LETTER L
2253 0x006D, // LATIN SMALL LETTER M
2254 0x006E, // LATIN SMALL LETTER N
2255 0x006F, // LATIN SMALL LETTER O
2256 0x0070, // LATIN SMALL LETTER P
2257 0x0071, // LATIN SMALL LETTER Q
2258 0x0072, // LATIN SMALL LETTER R
2259 0x0073, // LATIN SMALL LETTER S
2260 0x0074, // LATIN SMALL LETTER T
2261 0x0075, // LATIN SMALL LETTER U
2262 0x0076, // LATIN SMALL LETTER V
2263 0x0077, // LATIN SMALL LETTER W
2264 0x0078, // LATIN SMALL LETTER X
2265 0x0079, // LATIN SMALL LETTER Y
2266 0x007A, // LATIN SMALL LETTER Z
2267 0x007B, // LEFT CURLY BRACKET
2268 0x007C, // VERTICAL LINE
2269 0x007D, // RIGHT CURLY BRACKET
2270 0x007E, // TILDE
2271 0x007F, // DELETE
2272 0x20AC, // EURO SIGN
2273 0x0000,
2274 0x201A, // SINGLE LOW-9 QUOTATION MARK
2275 0x0000,
2276 0x201E, // DOUBLE LOW-9 QUOTATION MARK
2277 0x2026, // HORIZONTAL ELLIPSIS
2278 0x2020, // DAGGER
2279 0x2021, // DOUBLE DAGGER
2280 0x0000,
2281 0x2030, // PER MILLE SIGN
2282 0x0160, // LATIN CAPITAL LETTER S WITH CARON
2283 0x2039, // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
2284 0x015A, // LATIN CAPITAL LETTER S WITH ACUTE
2285 0x0164, // LATIN CAPITAL LETTER T WITH CARON
2286 0x017D, // LATIN CAPITAL LETTER Z WITH CARON
2287 0x0179, // LATIN CAPITAL LETTER Z WITH ACUTE
2288 0x0000,
2289 0x2018, // LEFT SINGLE QUOTATION MARK
2290 0x2019, // RIGHT SINGLE QUOTATION MARK
2291 0x201C, // LEFT DOUBLE QUOTATION MARK
2292 0x201D, // RIGHT DOUBLE QUOTATION MARK
2293 0x2022, // BULLET
2294 0x2013, // EN DASH
2295 0x2014, // EM DASH
2296 0x0000,
2297 0x2122, // TRADE MARK SIGN
2298 0x0161, // LATIN SMALL LETTER S WITH CARON
2299 0x203A, // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
2300 0x015B, // LATIN SMALL LETTER S WITH ACUTE
2301 0x0165, // LATIN SMALL LETTER T WITH CARON
2302 0x017E, // LATIN SMALL LETTER Z WITH CARON
2303 0x017A, // LATIN SMALL LETTER Z WITH ACUTE
2304 0x00A0, // NO-BREAK SPACE
2305 0x02C7, // CARON
2306 0x02D8, // BREVE
2307 0x0141, // LATIN CAPITAL LETTER L WITH STROKE
2308 0x00A4, // CURRENCY SIGN
2309 0x0104, // LATIN CAPITAL LETTER A WITH OGONEK
2310 0x00A6, // BROKEN BAR
2311 0x00A7, // SECTION SIGN
2312 0x00A8, // DIAERESIS
2313 0x00A9, // COPYRIGHT SIGN
2314 0x015E, // LATIN CAPITAL LETTER S WITH CEDILLA
2315 0x00AB, // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
2316 0x00AC, // NOT SIGN
2317 0x00AD, // SOFT HYPHEN
2318 0x00AE, // REGISTERED SIGN
2319 0x017B, // LATIN CAPITAL LETTER Z WITH DOT ABOVE
2320 0x00B0, // DEGREE SIGN
2321 0x00B1, // PLUS-MINUS SIGN
2322 0x02DB, // OGONEK
2323 0x0142, // LATIN SMALL LETTER L WITH STROKE
2324 0x00B4, // ACUTE ACCENT
2325 0x00B5, // MICRO SIGN
2326 0x00B6, // PILCROW SIGN
2327 0x00B7, // MIDDLE DOT
2328 0x00B8, // CEDILLA
2329 0x0105, // LATIN SMALL LETTER A WITH OGONEK
2330 0x015F, // LATIN SMALL LETTER S WITH CEDILLA
2331 0x00BB, // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
2332 0x013D, // LATIN CAPITAL LETTER L WITH CARON
2333 0x02DD, // DOUBLE ACUTE ACCENT
2334 0x013E, // LATIN SMALL LETTER L WITH CARON
2335 0x017C, // LATIN SMALL LETTER Z WITH DOT ABOVE
2336 0x0154, // LATIN CAPITAL LETTER R WITH ACUTE
2337 0x00C1, // LATIN CAPITAL LETTER A WITH ACUTE
2338 0x00C2, // LATIN CAPITAL LETTER A WITH CIRCUMFLEX
2339 0x0102, // LATIN CAPITAL LETTER A WITH BREVE
2340 0x00C4, // LATIN CAPITAL LETTER A WITH DIAERESIS
2341 0x0139, // LATIN CAPITAL LETTER L WITH ACUTE
2342 0x0106, // LATIN CAPITAL LETTER C WITH ACUTE
2343 0x00C7, // LATIN CAPITAL LETTER C WITH CEDILLA
2344 0x010C, // LATIN CAPITAL LETTER C WITH CARON
2345 0x00C9, // LATIN CAPITAL LETTER E WITH ACUTE
2346 0x0118, // LATIN CAPITAL LETTER E WITH OGONEK
2347 0x00CB, // LATIN CAPITAL LETTER E WITH DIAERESIS
2348 0x011A, // LATIN CAPITAL LETTER E WITH CARON
2349 0x00CD, // LATIN CAPITAL LETTER I WITH ACUTE
2350 0x00CE, // LATIN CAPITAL LETTER I WITH CIRCUMFLEX
2351 0x010E, // LATIN CAPITAL LETTER D WITH CARON
2352 0x0110, // LATIN CAPITAL LETTER D WITH STROKE
2353 0x0143, // LATIN CAPITAL LETTER N WITH ACUTE
2354 0x0147, // LATIN CAPITAL LETTER N WITH CARON
2355 0x00D3, // LATIN CAPITAL LETTER O WITH ACUTE
2356 0x00D4, // LATIN CAPITAL LETTER O WITH CIRCUMFLEX
2357 0x0150, // LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
2358 0x00D6, // LATIN CAPITAL LETTER O WITH DIAERESIS
2359 0x00D7, // MULTIPLICATION SIGN
2360 0x0158, // LATIN CAPITAL LETTER R WITH CARON
2361 0x016E, // LATIN CAPITAL LETTER U WITH RING ABOVE
2362 0x00DA, // LATIN CAPITAL LETTER U WITH ACUTE
2363 0x0170, // LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
2364 0x00DC, // LATIN CAPITAL LETTER U WITH DIAERESIS
2365 0x00DD, // LATIN CAPITAL LETTER Y WITH ACUTE
2366 0x0162, // LATIN CAPITAL LETTER T WITH CEDILLA
2367 0x00DF, // LATIN SMALL LETTER SHARP S
2368 0x0155, // LATIN SMALL LETTER R WITH ACUTE
2369 0x00E1, // LATIN SMALL LETTER A WITH ACUTE
2370 0x00E2, // LATIN SMALL LETTER A WITH CIRCUMFLEX
2371 0x0103, // LATIN SMALL LETTER A WITH BREVE
2372 0x00E4, // LATIN SMALL LETTER A WITH DIAERESIS
2373 0x013A, // LATIN SMALL LETTER L WITH ACUTE
2374 0x0107, // LATIN SMALL LETTER C WITH ACUTE
2375 0x00E7, // LATIN SMALL LETTER C WITH CEDILLA
2376 0x010D, // LATIN SMALL LETTER C WITH CARON
2377 0x00E9, // LATIN SMALL LETTER E WITH ACUTE
2378 0x0119, // LATIN SMALL LETTER E WITH OGONEK
2379 0x00EB, // LATIN SMALL LETTER E WITH DIAERESIS
2380 0x011B, // LATIN SMALL LETTER E WITH CARON
2381 0x00ED, // LATIN SMALL LETTER I WITH ACUTE
2382 0x00EE, // LATIN SMALL LETTER I WITH CIRCUMFLEX
2383 0x010F, // LATIN SMALL LETTER D WITH CARON
2384 0x0111, // LATIN SMALL LETTER D WITH STROKE
2385 0x0144, // LATIN SMALL LETTER N WITH ACUTE
2386 0x0148, // LATIN SMALL LETTER N WITH CARON
2387 0x00F3, // LATIN SMALL LETTER O WITH ACUTE
2388 0x00F4, // LATIN SMALL LETTER O WITH CIRCUMFLEX
2389 0x0151, // LATIN SMALL LETTER O WITH DOUBLE ACUTE
2390 0x00F6, // LATIN SMALL LETTER O WITH DIAERESIS
2391 0x00F7, // DIVISION SIGN
2392 0x0159, // LATIN SMALL LETTER R WITH CARON
2393 0x016F, // LATIN SMALL LETTER U WITH RING ABOVE
2394 0x00FA, // LATIN SMALL LETTER U WITH ACUTE
2395 0x0171, // LATIN SMALL LETTER U WITH DOUBLE ACUTE
2396 0x00FC, // LATIN SMALL LETTER U WITH DIAERESIS
2397 0x00FD, // LATIN SMALL LETTER Y WITH ACUTE
2398 0x0163, // LATIN SMALL LETTER T WITH CEDILLA
2399 0x02D9 // DOT ABOVE
2400 };
2401
GetToUnicodeTable() const2402 const pdf_utf16be* PdfWin1250Encoding::GetToUnicodeTable() const
2403 {
2404 return PdfWin1250Encoding::s_cEncoding;
2405 }
2406
2407 // -----------------------------------------------------
2408 // PdfIso88592Encoding
2409 // See: http://unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT
2410 // -----------------------------------------------------
2411
2412 // -----------------------------------------------------
2413 //
2414 // -----------------------------------------------------
2415
2416 const pdf_utf16be PdfIso88592Encoding::s_cEncoding[256] = {
2417 0x0000, // NULL
2418 0x0001, // START OF HEADING
2419 0x0002, // START OF TEXT
2420 0x0003, // END OF TEXT
2421 0x0004, // END OF TRANSMISSION
2422 0x0005, // ENQUIRY
2423 0x0006, // ACKNOWLEDGE
2424 0x0007, // BELL
2425 0x0008, // BACKSPACE
2426 0x0009, // HORIZONTAL TABULATION
2427 0x000A, // LINE FEED
2428 0x000B, // VERTICAL TABULATION
2429 0x000C, // FORM FEED
2430 0x000D, // CARRIAGE RETURN
2431 0x000E, // SHIFT OUT
2432 0x000F, // SHIFT IN
2433 0x0010, // DATA LINK ESCAPE
2434 0x0011, // DEVICE CONTROL ONE
2435 0x0012, // DEVICE CONTROL TWO
2436 0x0013, // DEVICE CONTROL THREE
2437 0x0014, // DEVICE CONTROL FOUR
2438 0x0015, // NEGATIVE ACKNOWLEDGE
2439 0x0016, // SYNCHRONOUS IDLE
2440 0x0017, // END OF TRANSMISSION BLOCK
2441 0x0018, // CANCEL
2442 0x0019, // END OF MEDIUM
2443 0x001A, // SUBSTITUTE
2444 0x001B, // ESCAPE
2445 0x001C, // FILE SEPARATOR
2446 0x001D, // GROUP SEPARATOR
2447 0x001E, // RECORD SEPARATOR
2448 0x001F, // UNIT SEPARATOR
2449 0x0020, // SPACE
2450 0x0021, // EXCLAMATION MARK
2451 0x0022, // QUOTATION MARK
2452 0x0023, // NUMBER SIGN
2453 0x0024, // DOLLAR SIGN
2454 0x0025, // PERCENT SIGN
2455 0x0026, // AMPERSAND
2456 0x0027, // APOSTROPHE
2457 0x0028, // LEFT PARENTHESIS
2458 0x0029, // RIGHT PARENTHESIS
2459 0x002A, // ASTERISK
2460 0x002B, // PLUS SIGN
2461 0x002C, // COMMA
2462 0x002D, // HYPHEN-MINUS
2463 0x002E, // FULL STOP
2464 0x002F, // SOLIDUS
2465 0x0030, // DIGIT ZERO
2466 0x0031, // DIGIT ONE
2467 0x0032, // DIGIT TWO
2468 0x0033, // DIGIT THREE
2469 0x0034, // DIGIT FOUR
2470 0x0035, // DIGIT FIVE
2471 0x0036, // DIGIT SIX
2472 0x0037, // DIGIT SEVEN
2473 0x0038, // DIGIT EIGHT
2474 0x0039, // DIGIT NINE
2475 0x003A, // COLON
2476 0x003B, // SEMICOLON
2477 0x003C, // LESS-THAN SIGN
2478 0x003D, // EQUALS SIGN
2479 0x003E, // GREATER-THAN SIGN
2480 0x003F, // QUESTION MARK
2481 0x0040, // COMMERCIAL AT
2482 0x0041, // LATIN CAPITAL LETTER A
2483 0x0042, // LATIN CAPITAL LETTER B
2484 0x0043, // LATIN CAPITAL LETTER C
2485 0x0044, // LATIN CAPITAL LETTER D
2486 0x0045, // LATIN CAPITAL LETTER E
2487 0x0046, // LATIN CAPITAL LETTER F
2488 0x0047, // LATIN CAPITAL LETTER G
2489 0x0048, // LATIN CAPITAL LETTER H
2490 0x0049, // LATIN CAPITAL LETTER I
2491 0x004A, // LATIN CAPITAL LETTER J
2492 0x004B, // LATIN CAPITAL LETTER K
2493 0x004C, // LATIN CAPITAL LETTER L
2494 0x004D, // LATIN CAPITAL LETTER M
2495 0x004E, // LATIN CAPITAL LETTER N
2496 0x004F, // LATIN CAPITAL LETTER O
2497 0x0050, // LATIN CAPITAL LETTER P
2498 0x0051, // LATIN CAPITAL LETTER Q
2499 0x0052, // LATIN CAPITAL LETTER R
2500 0x0053, // LATIN CAPITAL LETTER S
2501 0x0054, // LATIN CAPITAL LETTER T
2502 0x0055, // LATIN CAPITAL LETTER U
2503 0x0056, // LATIN CAPITAL LETTER V
2504 0x0057, // LATIN CAPITAL LETTER W
2505 0x0058, // LATIN CAPITAL LETTER X
2506 0x0059, // LATIN CAPITAL LETTER Y
2507 0x005A, // LATIN CAPITAL LETTER Z
2508 0x005B, // LEFT SQUARE BRACKET
2509 0x005C, // REVERSE SOLIDUS
2510 0x005D, // RIGHT SQUARE BRACKET
2511 0x005E, // CIRCUMFLEX ACCENT
2512 0x005F, // LOW LINE
2513 0x0060, // GRAVE ACCENT
2514 0x0061, // LATIN SMALL LETTER A
2515 0x0062, // LATIN SMALL LETTER B
2516 0x0063, // LATIN SMALL LETTER C
2517 0x0064, // LATIN SMALL LETTER D
2518 0x0065, // LATIN SMALL LETTER E
2519 0x0066, // LATIN SMALL LETTER F
2520 0x0067, // LATIN SMALL LETTER G
2521 0x0068, // LATIN SMALL LETTER H
2522 0x0069, // LATIN SMALL LETTER I
2523 0x006A, // LATIN SMALL LETTER J
2524 0x006B, // LATIN SMALL LETTER K
2525 0x006C, // LATIN SMALL LETTER L
2526 0x006D, // LATIN SMALL LETTER M
2527 0x006E, // LATIN SMALL LETTER N
2528 0x006F, // LATIN SMALL LETTER O
2529 0x0070, // LATIN SMALL LETTER P
2530 0x0071, // LATIN SMALL LETTER Q
2531 0x0072, // LATIN SMALL LETTER R
2532 0x0073, // LATIN SMALL LETTER S
2533 0x0074, // LATIN SMALL LETTER T
2534 0x0075, // LATIN SMALL LETTER U
2535 0x0076, // LATIN SMALL LETTER V
2536 0x0077, // LATIN SMALL LETTER W
2537 0x0078, // LATIN SMALL LETTER X
2538 0x0079, // LATIN SMALL LETTER Y
2539 0x007A, // LATIN SMALL LETTER Z
2540 0x007B, // LEFT CURLY BRACKET
2541 0x007C, // VERTICAL LINE
2542 0x007D, // RIGHT CURLY BRACKET
2543 0x007E, // TILDE
2544 0x007F, // DELETE
2545 0x0080, // <control>
2546 0x0081, // <control>
2547 0x0082, // <control>
2548 0x0083, // <control>
2549 0x0084, // <control>
2550 0x0085, // <control>
2551 0x0086, // <control>
2552 0x0087, // <control>
2553 0x0088, // <control>
2554 0x0089, // <control>
2555 0x008A, // <control>
2556 0x008B, // <control>
2557 0x008C, // <control>
2558 0x008D, // <control>
2559 0x008E, // <control>
2560 0x008F, // <control>
2561 0x0090, // <control>
2562 0x0091, // <control>
2563 0x0092, // <control>
2564 0x0093, // <control>
2565 0x0094, // <control>
2566 0x0095, // <control>
2567 0x0096, // <control>
2568 0x0097, // <control>
2569 0x0098, // <control>
2570 0x0099, // <control>
2571 0x009A, // <control>
2572 0x009B, // <control>
2573 0x009C, // <control>
2574 0x009D, // <control>
2575 0x009E, // <control>
2576 0x009F, // <control>
2577 0x00A0, // NO-BREAK SPACE
2578 0x0104, // LATIN CAPITAL LETTER A WITH OGONEK
2579 0x02D8, // BREVE
2580 0x0141, // LATIN CAPITAL LETTER L WITH STROKE
2581 0x00A4, // CURRENCY SIGN
2582 0x013D, // LATIN CAPITAL LETTER L WITH CARON
2583 0x015A, // LATIN CAPITAL LETTER S WITH ACUTE
2584 0x00A7, // SECTION SIGN
2585 0x00A8, // DIAERESIS
2586 0x0160, // LATIN CAPITAL LETTER S WITH CARON
2587 0x015E, // LATIN CAPITAL LETTER S WITH CEDILLA
2588 0x0164, // LATIN CAPITAL LETTER T WITH CARON
2589 0x0179, // LATIN CAPITAL LETTER Z WITH ACUTE
2590 0x00AD, // SOFT HYPHEN
2591 0x017D, // LATIN CAPITAL LETTER Z WITH CARON
2592 0x017B, // LATIN CAPITAL LETTER Z WITH DOT ABOVE
2593 0x00B0, // DEGREE SIGN
2594 0x0105, // LATIN SMALL LETTER A WITH OGONEK
2595 0x02DB, // OGONEK
2596 0x0142, // LATIN SMALL LETTER L WITH STROKE
2597 0x00B4, // ACUTE ACCENT
2598 0x013E, // LATIN SMALL LETTER L WITH CARON
2599 0x015B, // LATIN SMALL LETTER S WITH ACUTE
2600 0x02C7, // CARON
2601 0x00B8, // CEDILLA
2602 0x0161, // LATIN SMALL LETTER S WITH CARON
2603 0x015F, // LATIN SMALL LETTER S WITH CEDILLA
2604 0x0165, // LATIN SMALL LETTER T WITH CARON
2605 0x017A, // LATIN SMALL LETTER Z WITH ACUTE
2606 0x02DD, // DOUBLE ACUTE ACCENT
2607 0x017E, // LATIN SMALL LETTER Z WITH CARON
2608 0x017C, // LATIN SMALL LETTER Z WITH DOT ABOVE
2609 0x0154, // LATIN CAPITAL LETTER R WITH ACUTE
2610 0x00C1, // LATIN CAPITAL LETTER A WITH ACUTE
2611 0x00C2, // LATIN CAPITAL LETTER A WITH CIRCUMFLEX
2612 0x0102, // LATIN CAPITAL LETTER A WITH BREVE
2613 0x00C4, // LATIN CAPITAL LETTER A WITH DIAERESIS
2614 0x0139, // LATIN CAPITAL LETTER L WITH ACUTE
2615 0x0106, // LATIN CAPITAL LETTER C WITH ACUTE
2616 0x00C7, // LATIN CAPITAL LETTER C WITH CEDILLA
2617 0x010C, // LATIN CAPITAL LETTER C WITH CARON
2618 0x00C9, // LATIN CAPITAL LETTER E WITH ACUTE
2619 0x0118, // LATIN CAPITAL LETTER E WITH OGONEK
2620 0x00CB, // LATIN CAPITAL LETTER E WITH DIAERESIS
2621 0x011A, // LATIN CAPITAL LETTER E WITH CARON
2622 0x00CD, // LATIN CAPITAL LETTER I WITH ACUTE
2623 0x00CE, // LATIN CAPITAL LETTER I WITH CIRCUMFLEX
2624 0x010E, // LATIN CAPITAL LETTER D WITH CARON
2625 0x0110, // LATIN CAPITAL LETTER D WITH STROKE
2626 0x0143, // LATIN CAPITAL LETTER N WITH ACUTE
2627 0x0147, // LATIN CAPITAL LETTER N WITH CARON
2628 0x00D3, // LATIN CAPITAL LETTER O WITH ACUTE
2629 0x00D4, // LATIN CAPITAL LETTER O WITH CIRCUMFLEX
2630 0x0150, // LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
2631 0x00D6, // LATIN CAPITAL LETTER O WITH DIAERESIS
2632 0x00D7, // MULTIPLICATION SIGN
2633 0x0158, // LATIN CAPITAL LETTER R WITH CARON
2634 0x016E, // LATIN CAPITAL LETTER U WITH RING ABOVE
2635 0x00DA, // LATIN CAPITAL LETTER U WITH ACUTE
2636 0x0170, // LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
2637 0x00DC, // LATIN CAPITAL LETTER U WITH DIAERESIS
2638 0x00DD, // LATIN CAPITAL LETTER Y WITH ACUTE
2639 0x0162, // LATIN CAPITAL LETTER T WITH CEDILLA
2640 0x00DF, // LATIN SMALL LETTER SHARP S
2641 0x0155, // LATIN SMALL LETTER R WITH ACUTE
2642 0x00E1, // LATIN SMALL LETTER A WITH ACUTE
2643 0x00E2, // LATIN SMALL LETTER A WITH CIRCUMFLEX
2644 0x0103, // LATIN SMALL LETTER A WITH BREVE
2645 0x00E4, // LATIN SMALL LETTER A WITH DIAERESIS
2646 0x013A, // LATIN SMALL LETTER L WITH ACUTE
2647 0x0107, // LATIN SMALL LETTER C WITH ACUTE
2648 0x00E7, // LATIN SMALL LETTER C WITH CEDILLA
2649 0x010D, // LATIN SMALL LETTER C WITH CARON
2650 0x00E9, // LATIN SMALL LETTER E WITH ACUTE
2651 0x0119, // LATIN SMALL LETTER E WITH OGONEK
2652 0x00EB, // LATIN SMALL LETTER E WITH DIAERESIS
2653 0x011B, // LATIN SMALL LETTER E WITH CARON
2654 0x00ED, // LATIN SMALL LETTER I WITH ACUTE
2655 0x00EE, // LATIN SMALL LETTER I WITH CIRCUMFLEX
2656 0x010F, // LATIN SMALL LETTER D WITH CARON
2657 0x0111, // LATIN SMALL LETTER D WITH STROKE
2658 0x0144, // LATIN SMALL LETTER N WITH ACUTE
2659 0x0148, // LATIN SMALL LETTER N WITH CARON
2660 0x00F3, // LATIN SMALL LETTER O WITH ACUTE
2661 0x00F4, // LATIN SMALL LETTER O WITH CIRCUMFLEX
2662 0x0151, // LATIN SMALL LETTER O WITH DOUBLE ACUTE
2663 0x00F6, // LATIN SMALL LETTER O WITH DIAERESIS
2664 0x00F7, // DIVISION SIGN
2665 0x0159, // LATIN SMALL LETTER R WITH CARON
2666 0x016F, // LATIN SMALL LETTER U WITH RING ABOVE
2667 0x00FA, // LATIN SMALL LETTER U WITH ACUTE
2668 0x0171, // LATIN SMALL LETTER U WITH DOUBLE ACUTE
2669 0x00FC, // LATIN SMALL LETTER U WITH DIAERESIS
2670 0x00FD, // LATIN SMALL LETTER Y WITH ACUTE
2671 0x0163, // LATIN SMALL LETTER T WITH CEDILLA
2672 0x02D9 // DOT ABOVE
2673 };
2674
GetToUnicodeTable() const2675 const pdf_utf16be* PdfIso88592Encoding::GetToUnicodeTable() const
2676 {
2677 return PdfIso88592Encoding::s_cEncoding;
2678 }
2679
2680 }; /* namespace PoDoFo */
2681