Choose a string within a list

Hi, I would like to let the user select a string value within a list. It works with the example bau whan I change the list values it does not work anymore!
Instead of :
Dim listValues As String() = New String() {“Item0”, “Item1”, “Item2”, “Item3”, “Item4”}
I’d like to use this:
Dim listValues As String() = New String() {“utf-8”, “Windows-1252”, “utf-16”, “utf-32”}


  Public Shared Function GetEncodingOptions(ByVal doc As Rhino.RhinoDoc) As System.Text.Encoding
        ' For this example we will use a GetPoint class, but all of the custom
        ' "Get" classes support command line options.
        Dim gp As New Rhino.Input.Custom.GetOption()
        gp.SetCommandPrompt("Select encoding format: ")
        ' set up the options
        Dim listValues As String() = New String() {"Item0", "Item1", "Item2", "Item3", "Item4"}
        Dim listIndex As Integer = 1
        Dim opList As Integer = gp.AddOptionList("List", listValues, listIndex)

        While True
            Dim get_rc As Rhino.Input.GetResult = gp.[Get]()
            If get_rc = Rhino.Input.GetResult.Option Then
                Rhino.RhinoApp.WriteLine("Command line option values are")
                Rhino.RhinoApp.WriteLine(" List = {0}", listValues(listIndex))
                If gp.OptionIndex() = opList Then
                    listIndex = gp.[Option]().CurrentListOptionIndex
                End If
                Exit While
                Continue While
            End If

        End While

        Dim MyEncoding As System.Text.Encoding = System.Text.Encoding.UTF8
            MyEncoding = System.Text.Encoding.GetEncoding(listValues(listIndex))
        Catch ex As Exception
            Rhino.RhinoApp.WriteLine("Encoding value Error")
        End Try
        Return MyEncoding
    End Function

the - in between makes it bug.
dont know how to solve it. but then you atleast know the problem…

The dash - is a “reserved” character, because it has a special function in Rhino (makes commands scripted).
I think the strings can only contain alphanumeric and underscore characters and must start with a letter
(i.e. [A-Za-z][A-Za-z0-9_]* as regex)

Ok, I solved this removing the “-” from the prompt and renaming the string later.
Thanks for your help