Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub ChangeInputEncoding(NewEncoding As TextEncoding)
- '// rtfInput is a TextArea control in a Window class.
- '// CurrentType and Type* is an integer representing the type of data (Raw/Hex/Bin/Oct, respectively).
- '// As another note, I also tried doing:
- '// rtfInput.Text.Encoding = NewEncoding
- '// rtfInput.Text = ConvertEncoding(...)
- '// ...which both failed.
- Dim EncToA As TextEncoding = NewEncoding
- Dim EncFrmA As TextEncoding = rtfInput.Text.Encoding
- Dim EncFrmB, EncFrmC As TextEncoding
- If Self.CurrentType = Self.TypeRaw Then
- Dim sTmp As String = ConvertEncoding(rtfInput.Text, NewEncoding)
- rtfInput.Text = sTmp
- EncFrmB = rtfInput.Text.Encoding
- EncFrmC = sTmp.Encoding
- Break
- End If
- '// EncFrmA = ptr(&hB3D7546D)
- '// EncFrmB = ptr(&hB3D7546D)
- '// EncFrmC = ptr(&h23D6546D)
- '// EncToA = ptr(&h23D6546D)
- '// NewEncoding = ptr(&h23D6546D)
- '// Conclusion:
- '// REALbasic does not allow changing TextArea.Text's encoding.
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment