Powered by GeSHi

Source code for txt2src.vbs

(view source code of txt2src.vbs as plain text)

  1. Option Explicit
  2.  
  3. Const ForReading      = 1
  4. Const ForWriting      = 2
  5. Const ForAppending    = 8
  6. Const BinaryCompare   = 0
  7. Const TextCompare     = 1
  8. Const DatabaseCompare = 2
  9.  
  10. Dim arrCP(255)
  11. Dim blnBreak, blnCodePage, blnIndent, blnOverWrite, blnTabConvert, blnUnicode
  12. Dim i, intCodePage, intIndent, intTabConvert, intValidArgs
  13. Dim objFSO, objInFile, objOutFile, objStreamIn, wshShell
  14. Dim strCommand, strInFile, strOutFile, strScriptEnv, strTab, strText
  15.  
  16. ' Check command line arguments
  17. With WScript.Arguments
  18. 	' Check for /?
  19. 	If .Named.Exists( "?" ) Then
  20. 		Syntax ""
  21. 	End If
  22. 	' Initialize counter for valid named arguments
  23. 	intValidArgs = 0
  24. 	' /BR = add "<BR>" at the end of each line
  25. 	If .Named.Exists( "BR" ) Then
  26. 		blnBreak = True
  27. 		intValidArgs  = intValidArgs + 1
  28. 	Else
  29. 		blnIndent = False
  30. 	End If
  31. 	' /C:nnn = use codepage nnn for character translation
  32. 	If .Named.Exists( "C" ) Then
  33. 		intValidArgs  = intValidArgs + 1
  34. 		blnCodePage   = True
  35. 		If .Named( "C" ) = "" Then
  36. 			intCodePage = GetCodePage( )
  37. 			If intCodePage = 0 Then
  38. 				Syntax "ERROR: Unable to determine current codepage"
  39. 			Else
  40. 			Select Case intCodePage
  41. 				Case "437"
  42. 					FillArrayCP437
  43. 				Case "850"
  44. 					FillArrayCP850
  45. 				Case "858"
  46. 					FillArrayCP858
  47. 				Case "1252"
  48. 					FillArrayCP1252
  49. 				Case Else
  50. 					Syntax "ERROR: Invalid codepage specified"
  51. 			End Select
  52. 			End If
  53. 		Else
  54. 			intCodePage = .Named( "C" )
  55. 			Select Case intCodePage
  56. 				Case "437"
  57. 					FillArrayCP437
  58. 				Case "850"
  59. 					FillArrayCP850
  60. 				Case "858"
  61. 					FillArrayCP858
  62. 				Case "1252"
  63. 					FillArrayCP1252
  64. 				Case Else
  65. 					Syntax "ERROR: Invalid codepage specified"
  66. 			End Select
  67. 		End If
  68. 	Else
  69. 		blnCodePage = False
  70. 		FillArrayCP1252
  71. 	End If
  72. 	' /I:n = indent each line with n spaces (default 8)
  73. 	If .Named.Exists( "I" ) Then
  74. 		blnIndent = True
  75. 		intIndent = CInt( .Named( "I" ) )
  76. 		If intIndent = 0 Then intIndent = 8
  77. 		intValidArgs  = intValidArgs + 1
  78. 	Else
  79. 		blnIndent = False
  80. 	End If
  81. 	' /T:n = replace tabs with n times "&nbsp;" (default 4),
  82. 	'        and also replace double spaces with double "&nbsp;"
  83. 	If .Named.Exists( "T" ) Then
  84. 		blnTabConvert = True
  85. 		intTabConvert = CInt( .Named( "T" ) )
  86. 		If intTabConvert = 0 Then intTabConvert = 4
  87. 		intValidArgs  = intValidArgs + 1
  88. 	Else
  89. 		blnTabConvert = False
  90. 	End If
  91. 	' /U = treat text as Unicode (default is ASCII)
  92. 	If .Named.Exists( "U" ) Then
  93. 		blnUnicode   = True
  94. 		intValidArgs = intValidArgs + 1
  95. 	Else
  96. 		blnUnicode = False
  97. 	End If
  98. 	' /Y = overwrite existing target file
  99. 	If .Named.Exists( "Y" ) Then
  100. 		blnOverWrite = True
  101. 		intValidArgs = intValidArgs + 1
  102. 	Else
  103. 		blnOverWrite = False
  104. 	End If
  105. 	' Check if any "undefined" switches were used
  106. 	If intValidArgs <> .Named.Count Then Syntax "ERROR: Invalid switches"
  107.  
  108. 	' Check for forbidden combination of switches
  109. 	If blnCodePage And blnUnicode Then Syntax "ERROR: Switches /C and /U are mutually exclusive"
  110.  
  111. 	' Check the "unnamed" arguments (source and optionally target file)
  112. 	Select Case .Unnamed.Count
  113. 		Case 1
  114. 			strInFile  = .Unnamed( 0 )
  115. 		Case 2
  116. 			strInFile  = .Unnamed( 0 )
  117. 			strOutFile = .Unnamed( 1 )
  118. 		Case Else
  119. 			Syntax "ERROR: Invalid argument or invalid number of arguments"
  120. 	End Select
  121. End With
  122.  
  123. ' Create a file system object
  124. Set objFSO = CreateObject( "Scripting.FileSystemObject" )
  125.  
  126. With objFSO
  127. 	' Abort if the source file doesn't exist
  128. 	If Not .FileExists( strInFile ) Then
  129. 		Syntax "ERROR: File not found: " & strInFile
  130. 	End If
  131. 	' If no target file was specified, we will use the file
  132. 	' PATH and NAME of the source file, with a .SRC extension
  133. 	If WScript.Arguments.Unnamed.Count = 1 Then
  134. 		strOutFile = .BuildPath( .GetParentFolderName( strInFile ), _
  135. 		                         .GetBaseName( strInFile ) ) & ".src"
  136. 	End If
  137. 	' Abort if the target file exists, unless Overwrite was specified
  138. 	If .FileExists( strOutFile ) And Not blnOverWrite Then
  139. 		Syntax "ERROR: File exists: " & strOutFile
  140. 	End If
  141. 	' Open the source file for reading and the target file for writing
  142. 	Set objInFile   = .GetFile( strInFile )
  143. 	Set objStreamIn = objInFile.OpenAsTextStream( ForReading, blnUnicode )
  144. 	Set objOutFile  = .OpenTextFile( strOutFile, ForWriting, True, blnUnicode )
  145. End With
  146.  
  147. ' Read the text from the source file and close it
  148. strText = objStreamIn.ReadAll( )
  149. objStreamIn.Close
  150.  
  151. ' Replace each "special" character in the text by its HTML entity
  152. strText = Replace( strText, "&",  "&amp;",    1, -1, vbTextCompare )
  153. strText = Replace( strText, "<",  "&lt;",     1, -1, vbTextCompare )
  154. strText = Replace( strText, ">",  "&gt;",     1, -1, vbTextCompare )
  155. strText = Replace( strText, "^",  "&circ;",   1, -1, vbTextCompare )
  156. For i = 128 To 255
  157. 	If arrCP(i) <> "" Then
  158. 		strText = Replace( strText, Chr(i), arrCP(i), 1, -1, vbTextCompare )
  159. 	End If
  160. Next
  161.  
  162. ' Replace tabs if specified on the command line
  163. If blnTabConvert Then
  164. 	For i = 1 To intTabConvert
  165. 		strTab = strTab & "&nbsp;"
  166. 	Next
  167. 	strText = Replace( strText, vbTab, strTab, 1, -1, vbTextCompare )
  168. 	strTab = "&nbsp;&nbsp;"
  169. 	strText = Replace( strText, "  ",  strTab, 1, -1, vbTextCompare )
  170. End If
  171. ' Add indents if specified on the command line
  172. If blnIndent Then
  173. 	strText = Replace( strText, vbCrLf, vbCrLf & Space( intIndent ), 1, -1, vbTextCompare )
  174. 	strText = Space( intIndent ) & strText
  175. End If
  176. ' Add <BR> if specified on the command line
  177. If blnBreak Then
  178. 	strText = Replace( strText, vbCrLf, _
  179. 	          "<br>" & vbCrLf, 1, -1, vbTextCompare )
  180. End If
  181.  
  182. ' Write the modified text to the target file and close the file
  183. objOutFile.Write( strText )
  184. objOutFile.Close
  185.  
  186. ' Release the objects
  187. Set objInFile = Nothing
  188. Set objOutFile = Nothing
  189. Set objFSO = Nothing
  190.  
  191.  
  192. Sub Syntax( myMsg )
  193. 	If myMsg <> "" Then myMsg = myMsg & vbCrLf & vbCrLf
  194. 	myMsg = myMsg _
  195. 	      & "Txt2Src.vbs,  Version 2.00" & vbCrLf _
  196. 	      & "Convert special characters in a text file to HTML entities" _
  197. 	      & vbCrLf & vbCrLf _
  198. 	      & "Usage:  TXT2SRC  source  [target]  [/BR]  [/C[:n]]  [/I:n]  [/T:n]  [/U]  [/Y]" _
  199. 	      & vbCrLf & vbCrLf _
  200. 	      & "Where:  ""source""   is the text file to be read" _
  201. 	      & vbCrLf _
  202. 	      & "        ""target""   is the file which will contain the converted text" _
  203. 	      & vbCrLf _
  204. 	      & "                   (default is source path and name, with "".src"" extension)" _
  205. 	      & vbCrLf _
  206. 	      & "        ""/BR""      add ""<br>"" at each line break" _
  207. 	      & vbCrLf _
  208. 	      & "        ""/C[:n]""   use alternative codepage instead of 1252; valid n=437," _
  209. 	      & vbCrLf _
  210. 	      & "                   n=850, n=858 or n=1252, default n=current (" & GetCodePage( ) & ")" _
  211. 	      & vbCrLf _
  212. 	      & "        ""/I[:n]""   indent each line with n spaces (default n=8)" _
  213. 	      & vbCrLf _
  214. 	      & "        ""/T[:n]""   convert tabs to n non-breaking spaces (default n=4)" _
  215. 	      & vbCrLf _
  216. 	      & "                   and double spaces to double non-breaking spaces" _
  217. 	      & vbCrLf _
  218. 	      & "        ""/U""       treat text as Unicode (default ASCII)" _
  219. 	      & vbCrLf _
  220. 	      & "        ""/Y""       overwrite the target file if it exists" _
  221. 	      & vbCrLf & vbCrLf _
  222. 	      & "Note:   Switches /C and /U are mutually exclusive." _
  223. 	      & vbCrLf & vbCrLf _
  224. 	      & "Written by Rob van der Woude" & vbCrLf _
  225. 	      & "http://www.robvanderwoude.com"
  226. 	WScript.Echo myMsg
  227. 	WScript.Quit 1
  228. End Sub
  229.  
  230.  
  231. Function GetCodePage( )
  232. 	Dim arrCodepage, objExec, wshShell
  233. 	GetCodePage = 0
  234. 	Set wshShell = CreateObject( "WScript.Shell" )
  235. 	Set objExec  = wshShell.Exec( "%ComSpec% /C CHCP" )
  236. 	Do Until objExec.Status
  237. 		Wscript.Sleep 100
  238. 	Loop
  239. 	If objExec.StdErr.ReadAll = "" Then
  240. 		arrCodepage = Split( objExec.StdOut.ReadAll, " " )
  241. 		GetCodePage = CInt( arrCodepage( UBound( arrCodepage ) ) )
  242. 	End If
  243. 	Set objExec  = Nothing
  244. 	Set wshShell = Nothing
  245. End Function
  246.  
  247.  
  248. Sub FillArrayCP437
  249. 	Dim i
  250. 	For i = 0 To 255
  251. 		arrCP(i) = ""
  252. 	Next
  253. 	arrCP(7)   = "<em>{BEL}</em>"
  254. 	arrCP(8)   = "<em>{Backspace}</em>"
  255. 	arrCP(9)   = vbTab
  256. 	arrCP(26)  = "<em>{EOF}</em>"
  257. 	arrCP(27)  = "<em>{ESC}</em>"
  258. 	arrCP(128) = "&Ccedil;"
  259. 	arrCP(129) = "&uuml;"
  260. 	arrCP(130) = "&eacute;"
  261. 	arrCP(131) = "&acirc;"
  262. 	arrCP(132) = "&auml;"
  263. 	arrCP(133) = "&agrave;"
  264. 	arrCP(134) = "&aring;"
  265. 	arrCP(135) = "&ccedil;"
  266. 	arrCP(136) = "&ecirc;"
  267. 	arrCP(137) = "&euml;"
  268. 	arrCP(138) = "&egrave;"
  269. 	arrCP(139) = "&iuml;"
  270. 	arrCP(140) = "&icirc;"
  271. 	arrCP(141) = "&igrave;"
  272. 	arrCP(142) = "&Auml;"
  273. 	arrCP(143) = "&Aring;"
  274. 	arrCP(144) = "&Eacute;"
  275. 	arrCP(145) = "&aelig;"
  276. 	arrCP(146) = "&AElig;"
  277. 	arrCP(147) = "&ocirc;"
  278. 	arrCP(148) = "&ouml;"
  279. 	arrCP(149) = "&ograve;"
  280. 	arrCP(150) = "&ucirc;"
  281. 	arrCP(151) = "&ugrave;"
  282. 	arrCP(152) = "&yuml;"
  283. 	arrCP(153) = "&Ouml;"
  284. 	arrCP(154) = "&Uuml;"
  285. 	arrCP(155) = "&cent;"
  286. 	arrCP(156) = "&pound;"
  287. 	arrCP(157) = "&yen;"
  288. 	arrCP(158) = "<em>{Pts}</em>"
  289. 	arrCP(159) = "&fnof;"
  290. 	arrCP(160) = "&aacute;"
  291. 	arrCP(161) = "&iacute;"
  292. 	arrCP(162) = "&oacute;"
  293. 	arrCP(163) = "&uacute;"
  294. 	arrCP(164) = "&ntilde;"
  295. 	arrCP(165) = "&Ntilde;"
  296. 	arrCP(166) = "&ordf;"
  297. 	arrCP(167) = "&ordm;"
  298. 	arrCP(168) = "&iquest;"
  299. 	arrCP(170) = "&not;"
  300. 	arrCP(171) = "&frac12;"
  301. 	arrCP(172) = "&frac14;"
  302. 	arrCP(173) = "&iexcl;"
  303. 	arrCP(174) = "&laquo;"
  304. 	arrCP(175) = "&raquo;"
  305. 	arrCP(224) = "&alpha;"
  306. 	arrCP(225) = "&szlig;"
  307. 	arrCP(226) = "&gamma;"
  308. 	arrCP(227) = "&pi;"
  309. 	arrCP(228) = "&Sigma;"
  310. 	arrCP(229) = "&sigma;"
  311. 	arrCP(230) = "&micro;"
  312. 	arrCP(231) = "&tau;"
  313. 	arrCP(232) = "&phi;"
  314. 	arrCP(233) = "&Theta;"
  315. 	arrCP(234) = "&Omega;"
  316. 	arrCP(235) = "&delta;"
  317. 	arrCP(236) = "&infin;"
  318. 	arrCP(237) = "&Phi;"
  319. 	arrCP(238) = "&epsilon;"
  320. 	arrCP(239) = "&cap;"
  321. 	arrCP(240) = "&equiv;"
  322. 	arrCP(241) = "&plusmn;"
  323. 	arrCP(242) = "&ge;"
  324. 	arrCP(243) = "&le;"
  325. 	arrCP(246) = "&divide;"
  326. 	arrCP(247) = "&asymp;"
  327. 	arrCP(248) = "&deg;"
  328. 	arrCP(250) = "&middot;"
  329. 	arrCP(251) = "&radic;"
  330. 	arrCP(252) = "<sup>n</sup>"
  331. 	arrCP(253) = "&sup2;"
  332. 	arrCP(255) = "&nbsp;"
  333. End Sub
  334.  
  335.  
  336. Sub FillArrayCP850
  337. 	FillArrayCP437
  338. 	arrCP(155) = "&oslash;"
  339. 	arrCP(157) = "&Oslash;"
  340. 	arrCP(158) = "&times;"
  341. 	arrCP(169) = "&reg;"
  342. 	arrCP(181) = "&Aacute;"
  343. 	arrCP(182) = "&Acirc;"
  344. 	arrCP(183) = "&Agrave;"
  345. 	arrCP(181) = "&copy;"
  346. 	arrCP(198) = "&atilde;"
  347. 	arrCP(199) = "&Atilde;"
  348. 	arrCP(207) = "&curren;"
  349. 	arrCP(208) = "&eth;"
  350. 	arrCP(209) = "&ETH;"
  351. 	arrCP(210) = "&Ecirc;"
  352. 	arrCP(211) = "&Euml;"
  353. 	arrCP(212) = "&Egrave;"
  354. 	arrCP(213) = "&#305;"
  355. 	arrCP(214) = "&Iacute;"
  356. 	arrCP(215) = "&Icirc;"
  357. 	arrCP(216) = "&Iuml;"
  358. 	arrCP(221) = "&brvbar;"
  359. 	arrCP(222) = "&Igrave;"
  360. 	arrCP(224) = "&Oacute;"
  361. 	arrCP(226) = "&Ocirc;"
  362. 	arrCP(227) = "&Ograve;"
  363. 	arrCP(228) = "&otilde;"
  364. 	arrCP(229) = "&Otilde;"
  365. 	arrCP(231) = "&thorn;"
  366. 	arrCP(232) = "&THORN;"
  367. 	arrCP(233) = "&Uacute;"
  368. 	arrCP(234) = "&Ucirc;"
  369. 	arrCP(235) = "&Ugrave;"
  370. 	arrCP(236) = "&yacute;"
  371. 	arrCP(237) = "&Yacute;"
  372. 	arrCP(238) = "&#175;"
  373. 	arrCP(239) = "&acute;"
  374. 	arrCP(240) = "&shy;'"
  375. 	arrCP(241) = "&plusmn;"
  376. 	arrCP(242) = "&#8215;"
  377. 	arrCP(243) = "&frac34;"
  378. 	arrCP(244) = "&para;"
  379. 	arrCP(245) = "&sect;"
  380. 	arrCP(247) = "&cedil;"
  381. 	arrCP(249) = "&uml;"
  382. 	arrCP(251) = "&sup1;"
  383. 	arrCP(252) = "&sup3;"
  384. 	arrCP(255) = "&nbsp;"
  385. End Sub
  386.  
  387.  
  388. Sub FillArrayCP858
  389. 	FillArrayCP850
  390. 	arrCP(213) = "&euro;"
  391. End Sub
  392.  
  393.  
  394. Sub FillArrayCP1252
  395. 	FillArrayCP437
  396. 	arrCP(128) = "&euro;"
  397. 	arrCP(129) = ""
  398. 	arrCP(130) = "&sbquo;"
  399. 	arrCP(131) = "&fnof;"
  400. 	arrCP(132) = "&bdquo;"
  401. 	arrCP(133) = "&hellip;"
  402. 	arrCP(134) = "&dagger;"
  403. 	arrCP(135) = "&Dagger;"
  404. 	arrCP(136) = "&circ;"
  405. 	arrCP(137) = "&permil;"
  406. 	arrCP(138) = "&Scaron;"
  407. 	arrCP(139) = "&lsaquo;"
  408. 	arrCP(140) = "&OElig;"
  409. 	arrCP(141) = ""
  410. 	arrCP(142) = "&#381;"
  411. 	arrCP(143) = ""
  412. 	arrCP(144) = ""
  413. 	arrCP(145) = "&lsquo;"
  414. 	arrCP(146) = "&rsquo;"
  415. 	arrCP(147) = "&ldquo;"
  416. 	arrCP(148) = "&rdquo;"
  417. 	arrCP(149) = "&bull;"
  418. 	arrCP(150) = "&ndash;"
  419. 	arrCP(151) = "&mdash;"
  420. 	'arrCP(152) = "&tilde;"
  421. 	arrCP(153) = "&trade;"
  422. 	arrCP(154) = "&scaron;"
  423. 	arrCP(155) = "&rsaquo;"
  424. 	arrCP(156) = "&oelig;"
  425. 	arrCP(157) = ""
  426. 	arrCP(158) = "&#382;"
  427. 	arrCP(159) = "&Yuml;"
  428. 	arrCP(160) = "&nbsp;"
  429. 	arrCP(161) = "&iexcl;"
  430. 	arrCP(162) = "&cent;"
  431. 	arrCP(163) = "&pound;"
  432. 	arrCP(164) = "&curren;"
  433. 	arrCP(165) = "&yen;"
  434. 	arrCP(166) = "&brvbar;"
  435. 	arrCP(167) = "&sect;"
  436. 	arrCP(168) = "&uml;"
  437. 	arrCP(169) = "&copy;"
  438. 	arrCP(170) = "&ordf;"
  439. 	arrCP(171) = "&laquo;"
  440. 	arrCP(172) = "&not;"
  441. 	arrCP(173) = "&shy;"
  442. 	arrCP(174) = "&reg;"
  443. 	arrCP(175) = "&macron;"
  444. 	arrCP(176) = "&deg;"
  445. 	arrCP(177) = "&plusmn;"
  446. 	arrCP(178) = "&sup2;"
  447. 	arrCP(179) = "&sup3;"
  448. 	arrCP(180) = "&acute;"
  449. 	arrCP(181) = "&micro;"
  450. 	arrCP(182) = "&para;"
  451. 	arrCP(183) = "&middot;"
  452. 	arrCP(184) = "&cedil;"
  453. 	arrCP(185) = "&sup1;"
  454. 	arrCP(186) = "&ordm;"
  455. 	arrCP(187) = "&raquo;"
  456. 	arrCP(188) = "&frac14;"
  457. 	arrCP(189) = "&frac12;"
  458. 	arrCP(190) = "&frac34;"
  459. 	arrCP(191) = "&iquest;"
  460. 	arrCP(192) = "&Agrave;"
  461. 	arrCP(193) = "&Aacute;"
  462. 	arrCP(194) = "&Acirc;"
  463. 	arrCP(195) = "&Atilde;"
  464. 	arrCP(196) = "&Auml;"
  465. 	arrCP(197) = "&Aring;"
  466. 	arrCP(198) = "&AElig;"
  467. 	arrCP(199) = "&Ccedil;"
  468. 	arrCP(200) = "&Egrave;"
  469. 	arrCP(201) = "&Eacute;"
  470. 	arrCP(202) = "&Ecirc;"
  471. 	arrCP(203) = "&Euml;"
  472. 	arrCP(204) = "&Igrave;"
  473. 	arrCP(205) = "&Iacute;"
  474. 	arrCP(206) = "&Icirc;"
  475. 	arrCP(207) = "&Iuml;"
  476. 	arrCP(208) = "&ETH;"
  477. 	arrCP(209) = "&Ntilde;"
  478. 	arrCP(210) = "&Ograve;"
  479. 	arrCP(211) = "&Oacute;"
  480. 	arrCP(212) = "&Ocirc;"
  481. 	arrCP(213) = "&Otilde;"
  482. 	arrCP(214) = "&Ouml;"
  483. 	arrCP(215) = "&times;"
  484. 	arrCP(216) = "&Oslash;"
  485. 	arrCP(217) = "&Ugrave;"
  486. 	arrCP(218) = "&Uacute;"
  487. 	arrCP(219) = "&Ucirc;"
  488. 	arrCP(220) = "&Uuml;"
  489. 	arrCP(221) = "&Yacute;"
  490. 	arrCP(222) = "&THORN;"
  491. 	arrCP(223) = "&szlig;"
  492. 	arrCP(224) = "&agrave;"
  493. 	arrCP(225) = "&aacute;"
  494. 	arrCP(226) = "&acirc;"
  495. 	arrCP(227) = "&atilde;"
  496. 	arrCP(228) = "&auml;"
  497. 	arrCP(229) = "&aring;"
  498. 	arrCP(230) = "&aelig;"
  499. 	arrCP(231) = "&ccedil;"
  500. 	arrCP(232) = "&egrave;"
  501. 	arrCP(233) = "&eacute;"
  502. 	arrCP(234) = "&ecirc;"
  503. 	arrCP(235) = "&euml;"
  504. 	arrCP(236) = "&igrave;"
  505. 	arrCP(237) = "&iacute;"
  506. 	arrCP(238) = "&icirc;"
  507. 	arrCP(239) = "&iuml;"
  508. 	arrCP(240) = "&eth;"
  509. 	arrCP(241) = "&ntilde;"
  510. 	arrCP(242) = "&ograve;"
  511. 	arrCP(243) = "&oacute;"
  512. 	arrCP(244) = "&ocirc;"
  513. 	arrCP(245) = "&otilde;"
  514. 	arrCP(246) = "&ouml;"
  515. 	arrCP(247) = "&divide;"
  516. 	arrCP(248) = "&oslash;"
  517. 	arrCP(249) = "&ugrave;"
  518. 	arrCP(250) = "&uacute;"
  519. 	arrCP(251) = "&ucirc;"
  520. 	arrCP(252) = "&uuml;"
  521. 	arrCP(253) = "&yacute;"
  522. 	arrCP(254) = "&thorn;"
  523. 	arrCP(255) = "&yuml;"
  524. End Sub
  525.