Remeber those tests where you're given some sort of pattern (eg. 1,3,9,27) and you have to figure out the next item in the sequence by coming up with a formula? I wonder if Dan McKinley's colleague was ever able to figure those questions out ...

Protected Function ANSIConvert(ByVal str As String) As String
  Try
    ''' one better manual process is to copy the letter from html and paste into word and save rtf file and find the coresponding string.
    Dim xStr As String = str
    If InStr(xStr, Chr(123)) > 0 _
        OrElse InStr(xStr, Chr(125)) > 0 _
        OrElse InStr(xStr, Chr(128)) > 0 _
        OrElse InStr(xStr, Chr(145)) > 0 _
        OrElse InStr(xStr, Chr(146)) > 0 Then
      '{123'}125'128€145'146
      xStr = Replace(xStr, Chr(123), "\'7b")
      xStr = Replace(xStr, Chr(125), "\'7c")
      xStr = Replace(xStr, Chr(128), "\'80")
      xStr = Replace(xStr, Chr(145), "\'91")
      xStr = Replace(xStr, Chr(146), "\'92")
    End If
    If InStr(xStr, Chr(161)) > 0 _
      OrElse InStr(xStr, Chr(162)) > 0 _
      OrElse InStr(xStr, Chr(163)) > 0 _
      OrElse InStr(xStr, Chr(164)) > 0 _
      OrElse InStr(xStr, Chr(165)) > 0 Then
      '¡161'¢162'£163'¤164'¥165
      xStr = Replace(xStr, Chr(161), "\'a1")
      xStr = Replace(xStr, Chr(162), "\'a2")
      xStr = Replace(xStr, Chr(163), "\'a3")
      xStr = Replace(xStr, Chr(164), "\'a4")
      xStr = Replace(xStr, Chr(165), "\'a5")
    End If
    If InStr(xStr, Chr(166)) > 0 _
      OrElse InStr(xStr, Chr(167)) > 0 _
      OrElse InStr(xStr, Chr(168)) > 0 _
      OrElse InStr(xStr, Chr(169)) > 0 _
      OrElse InStr(xStr, Chr(170)) > 0 Then
      '¦166 '§167 '¨168 '©169 'ª170()
      xStr = Replace(xStr, Chr(166), "\'a6")
      xStr = Replace(xStr, Chr(167), "\'a7")
      xStr = Replace(xStr, Chr(168), "\'a8")
      xStr = Replace(xStr, Chr(169), "\'a9")
      xStr = Replace(xStr, Chr(170), "\'aa")
    End If
    If InStr(xStr, Chr(171)) > 0 _
              OrElse InStr(xStr, Chr(172)) > 0 _
              OrElse InStr(xStr, Chr(173)) > 0 _
              OrElse InStr(xStr, Chr(174)) > 0 _
              OrElse InStr(xStr, Chr(175)) > 0 Then
      '«171 '¬172'­173'®174'¯175
      xStr = Replace(xStr, Chr(171), "\'ab")
      xStr = Replace(xStr, Chr(172), "\'ac")
      xStr = Replace(xStr, Chr(173), "\'ad")
      xStr = Replace(xStr, Chr(174), "\'ae")
      xStr = Replace(xStr, Chr(175), "\'af")
    End If

    If InStr(xStr, Chr(176)) > 0 _
              OrElse InStr(xStr, Chr(177)) > 0 _
              OrElse InStr(xStr, Chr(178)) > 0 _
              OrElse InStr(xStr, Chr(179)) > 0 _
              OrElse InStr(xStr, Chr(180)) > 0 Then
      '°176'±177'²178'³179'´180
      xStr = Replace(xStr, Chr(176), "\'b0")
      xStr = Replace(xStr, Chr(177), "\'b1")
      xStr = Replace(xStr, Chr(178), "\'b2")
      xStr = Replace(xStr, Chr(179), "\'b3")
      xStr = Replace(xStr, Chr(180), "\'b4")
    End If
    If InStr(xStr, Chr(181)) > 0 _
                      OrElse InStr(xStr, Chr(182)) > 0 _
                      OrElse InStr(xStr, Chr(183)) > 0 _
                      OrElse InStr(xStr, Chr(184)) > 0 _
                      OrElse InStr(xStr, Chr(185)) > 0 Then
      'µ181()'¶182'·183'¸184'¹185
      xStr = Replace(xStr, Chr(181), "\'b5")
      xStr = Replace(xStr, Chr(182), "\'b6")
      xStr = Replace(xStr, Chr(183), "\'b7")
      xStr = Replace(xStr, Chr(184), "\'b8")
      xStr = Replace(xStr, Chr(185), "\'b9")
    End If
    If InStr(xStr, Chr(186)) > 0 _
              OrElse InStr(xStr, Chr(187)) > 0 _
              OrElse InStr(xStr, Chr(188)) > 0 _
              OrElse InStr(xStr, Chr(189)) > 0 _
              OrElse InStr(xStr, Chr(190)) > 0 _
              OrElse InStr(xStr, Chr(191)) > 0 Then
      'º186()'»187'¼188'½189'¾190'¿191
      xStr = Replace(xStr, Chr(186), "\'ba")
      xStr = Replace(xStr, Chr(187), "\'bb")
      xStr = Replace(xStr, Chr(188), "\'bc")
      xStr = Replace(xStr, Chr(189), "\'bd")
      xStr = Replace(xStr, Chr(190), "\'be")
      xStr = Replace(xStr, Chr(191), "\'bf")
    End If

    If InStr(xStr, Chr(192)) > 0 _
        OrElse InStr(xStr, Chr(193)) > 0 _
        OrElse InStr(xStr, Chr(194)) > 0 _
        OrElse InStr(xStr, Chr(195)) > 0 _
        OrElse InStr(xStr, Chr(196)) > 0 _
        OrElse InStr(xStr, Chr(197)) > 0 Then
      'À192()Á193()Â194()Ã195()Ä196()Å197()
      xStr = Replace(xStr, Chr(192), "\'c0")
      xStr = Replace(xStr, Chr(193), "\'c1")
      xStr = Replace(xStr, Chr(194), "\'c2")
      xStr = Replace(xStr, Chr(195), "\'c3")
      xStr = Replace(xStr, Chr(196), "\'c4")
      xStr = Replace(xStr, Chr(197), "\'c5")
    End If
    If InStr(xStr, Chr(198)) > 0 OrElse InStr(xStr, Chr(199)) > 0 Then
      'Æ198()'Ç199()
      xStr = Replace(xStr, Chr(198), "\'c6")
      xStr = Replace(xStr, Chr(199), "\'c7")
    End If
    If InStr(xStr, Chr(200)) > 0 _
               OrElse InStr(xStr, Chr(201)) > 0 _
               OrElse InStr(xStr, Chr(202)) > 0 _
               OrElse InStr(xStr, Chr(203)) > 0 Then
      'È200()É201()Ê202()Ë203()
      xStr = Replace(xStr, Chr(200), "\'c8")
      xStr = Replace(xStr, Chr(201), "\'c9")
      xStr = Replace(xStr, Chr(202), "\'ca")
      xStr = Replace(xStr, Chr(203), "\'cb")
    End If
    If InStr(xStr, Chr(204)) > 0 _
      OrElse InStr(xStr, Chr(205)) > 0 _
      OrElse InStr(xStr, Chr(206)) > 0 _
      OrElse InStr(xStr, Chr(207)) > 0 Then
      'Ì204()Í205()Î206()Ï207()
      xStr = Replace(xStr, Chr(204), "\'cc")
      xStr = Replace(xStr, Chr(205), "\'cd")
      xStr = Replace(xStr, Chr(206), "\'ce")
      xStr = Replace(xStr, Chr(207), "\'cf")
    End If
    If InStr(xStr, Chr(208)) > 0 _
      OrElse InStr(xStr, Chr(209)) > 0 Then
      'Ð208()'Ñ209()
      xStr = Replace(xStr, Chr(208), "\'d0")
      xStr = Replace(xStr, Chr(209), "\'d1")
    End If
    If InStr(xStr, Chr(210)) > 0 _
      OrElse InStr(xStr, Chr(211)) > 0 _
      OrElse InStr(xStr, Chr(212)) > 0 _
      OrElse InStr(xStr, Chr(213)) > 0 _
      OrElse InStr(xStr, Chr(214)) > 0 Then
      'Ò210()Ó211()Ô212()Õ213()Ö214()
      xStr = Replace(xStr, Chr(210), "\'d2")
      xStr = Replace(xStr, Chr(211), "\'d3")
      xStr = Replace(xStr, Chr(212), "\'d4")
      xStr = Replace(xStr, Chr(213), "\'d5")
      xStr = Replace(xStr, Chr(214), "\'d6")
    End If
    If InStr(xStr, Chr(215)) > 0 OrElse InStr(xStr, Chr(216)) > 0 Then
      '×215'Ø216()
      xStr = Replace(xStr, Chr(215), "\'d7")
      xStr = Replace(xStr, Chr(216), "\'d8")
    End If
    If InStr(xStr, Chr(217)) > 0 _
      OrElse InStr(xStr, Chr(218)) > 0 _
      OrElse InStr(xStr, Chr(219)) > 0 _
      OrElse InStr(xStr, Chr(220)) > 0 Then
      'Ù217()'Ú218()'Û219()'Ü220()
      xStr = Replace(xStr, Chr(217), "\'d9")
      xStr = Replace(xStr, Chr(218), "\'da")
      xStr = Replace(xStr, Chr(219), "\'db")
      xStr = Replace(xStr, Chr(220), "\'dc")
    End If
    If InStr(xStr, Chr(221)) > 0 OrElse InStr(xStr, Chr(222)) > 0 OrElse InStr(xStr, Chr(223)) > 0 Then
      'Ý221()'Þ222()'ß223()
      xStr = Replace(xStr, Chr(221), "\'dd")
      xStr = Replace(xStr, Chr(222), "\'de")
      xStr = Replace(xStr, Chr(223), "\'df")
    End If
    If InStr(xStr, Chr(224)) > 0 _
        OrElse InStr(xStr, Chr(225)) > 0 _
        OrElse InStr(xStr, Chr(226)) > 0 _
        OrElse InStr(xStr, Chr(227)) > 0 _
        OrElse InStr(xStr, Chr(228)) > 0 _
        OrElse InStr(xStr, Chr(229)) > 0 Then
      'à224()'á225()'â226()'ã227()'ä228()'å229()
      xStr = Replace(xStr, Chr(224), "\'e0")
      xStr = Replace(xStr, Chr(225), "\'e1")
      xStr = Replace(xStr, Chr(226), "\'e2")
      xStr = Replace(xStr, Chr(227), "\'e3")
      xStr = Replace(xStr, Chr(228), "\'e4")
      xStr = Replace(xStr, Chr(229), "\'e5")
    End If
    If InStr(xStr, Chr(230)) > 0 OrElse InStr(xStr, Chr(231)) > 0 Then
      'æ230()'ç231()
      xStr = Replace(xStr, Chr(230), "\'e6")
      xStr = Replace(xStr, Chr(231), "\'e7")
    End If
    If InStr(xStr, Chr(232)) > 0 _
      OrElse InStr(xStr, Chr(233)) > 0 _
      OrElse InStr(xStr, Chr(234)) > 0 _
      OrElse InStr(xStr, Chr(235)) > 0 Then
      'è232()'é233()'ê234()'ë235()
      xStr = Replace(xStr, Chr(232), "\'e8")
      xStr = Replace(xStr, Chr(233), "\'e9")
      xStr = Replace(xStr, Chr(234), "\'ea")
      xStr = Replace(xStr, Chr(235), "\'eb")
    End If
    If InStr(xStr, Chr(236)) > 0 _
      OrElse InStr(xStr, Chr(237)) > 0 _
      OrElse InStr(xStr, Chr(238)) > 0 _
      OrElse InStr(xStr, Chr(239)) > 0 Then
      'ì236()'í237()'î238()'ï239()
      xStr = Replace(xStr, Chr(236), "\'ec")
      xStr = Replace(xStr, Chr(237), "\'ed")
      xStr = Replace(xStr, Chr(238), "\'ee")
      xStr = Replace(xStr, Chr(239), "\'ef")
    End If
    If InStr(xStr, Chr(240)) > 0 OrElse InStr(xStr, Chr(241)) > 0 Then
      'ð240()'ñ241()
      xStr = Replace(xStr, Chr(240), "\'f0")
      xStr = Replace(xStr, Chr(241), "\'f1")
    End If
    If InStr(xStr, Chr(242)) > 0 _
        OrElse InStr(xStr, Chr(243)) > 0 _
        OrElse InStr(xStr, Chr(244)) > 0 _
        OrElse InStr(xStr, Chr(245)) > 0 _
        OrElse InStr(xStr, Chr(246)) > 0 Then
      'ò242()'ó243()'ô244()'õ245()'ö246()
      xStr = Replace(xStr, Chr(242), "\'f2")
      xStr = Replace(xStr, Chr(243), "\'f3")
      xStr = Replace(xStr, Chr(244), "\'f4")
      xStr = Replace(xStr, Chr(245), "\'f5")
      xStr = Replace(xStr, Chr(246), "\'f6")
    End If
    If InStr(xStr, Chr(240)) > 0 OrElse InStr(xStr, Chr(241)) > 0 Then
      '÷247'ø248()
      xStr = Replace(xStr, Chr(247), "\'f7")
      xStr = Replace(xStr, Chr(248), "\'f8")
    End If
    If InStr(xStr, Chr(249)) > 0 _
      OrElse InStr(xStr, Chr(250)) > 0 _
      OrElse InStr(xStr, Chr(251)) > 0 _
      OrElse InStr(xStr, Chr(252)) > 0 Then
      'ù249()'ú250()'û251()'ü252()
      xStr = Replace(xStr, Chr(249), "\'f9")
      xStr = Replace(xStr, Chr(250), "\'fa")
      xStr = Replace(xStr, Chr(251), "\'fb")
      xStr = Replace(xStr, Chr(252), "\'fc")
    End If
    If InStr(xStr, Chr(253)) > 0 _
      OrElse InStr(xStr, Chr(254)) > 0 _
      OrElse InStr(xStr, Chr(255)) > 0 Then
      'ý253()'þ254()'ÿ255()
      xStr = Replace(xStr, Chr(253), "\'fd")
      xStr = Replace(xStr, Chr(254), "\'fe")
      xStr = Replace(xStr, Chr(255), "\'ff")
    End If
    Return xStr
  Catch ex As Exception
    Throw New Exception(ex)
  End Try
End Function

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!