Sorry, Was using Mac to figure it out and hadn’t gotten to PC.
That didn’t work.
I tried that since code wise it was easier than trying to get a string set to a particular encoding.
I checked and the textarea that is utf8. Not sure which to do
Thanks Dave.
I hadn’t considered explaining that. It exists.
It is not being recognized on Windows in the string comparison of Instr. I’d put the exact lines and text here but I am on my phone.
It works quite well on a Mac. I have a complement kPrm0R and
I have the two constant strings shrunk to a textsize value of one and the section in between made bold. When I had the constants as a single character it worked on both platforms
First off, the previous character that I used as a property/computed property are known as “harpoons” or “?” and “?”. I called this Prime1L and Prime1R. They worked.
I replaced that with html styled notation a while ago.
Here is a copy of a line of text that I read in.
The following is the first line that my html styled “Prime” or Prm0L and Prm0R separators does not work on a PC.
If 0 < InStr(tCont.Text, Prm0L) And 0 <> InStr(tCont.Text, Prm0R) Then//Getting Prime locations
tCont is the control and in this case a textarea. tCont.Text is the control’s text.
I haven’t worked on making the code work on displaying the textarea with the fontsize and other attributes like bold and underline and getting the correct length to make the Prime sections ( and ) disappear.
There are 3 images that follow.
Correct view of string on a Mac.
Showing another way I know I have Instr correct.
What happens on a PC.
This first image is showing the Mac with bolding and underlining.
The next image is another way I know my Instr coding works because the textarea also has 2 areas with different font size.
The third image is what happens on a PC and you will see no bolding or underlining.
Thanks for the confidence.
I agree and am confused because everywhere I check it is UTF8.
I look at my “constants” and the string in the textarea and other places in the little debugging box that shows the actual text and it’s all UTF8.
I have had problems with encoding and debugged those and they work correctly.
Annoying
dim s as string="a <p0>song</p0>; [??] a melody; an air; a tune; an aria¶??? an arietta.¶?? ??? a song composer.¶??? a collection of songs.¶?? ?? the song form"
the encoding of S is NIL… (on macOS at least)
so perhaps what you THINK is UTF-8 isn’t really
I just double checked at the usual culprits and found no problems.
I put a BOM on every file and it is saved encoded as matching the BOM.
Every File I read in goes through the same inspection and I would get an error message if it shows up wrong. They do occasionally get screwed like if I forget and think I can save it with something like MS Word. TextWrangler works always.
This is the code that reads it in. I’m not going to translate properties.
[code]rCardtis.Encoding= Encdng
Dim aFile As String = rCardtis.ReadAll
Dim aBOM as String = Encdng.Chr(&hFEFF)//Binary is EFBB BF
Dim bomLength As Integer = aBOM.LenB
rCardtis.close
If aFile = ""Then
MsgBox “The File has been damaged. Please use the Backup.”
ElseIf Encdng.IsValidData(AFile) And left(AFile,1) = Encdng.Chr(&hFEFF) Then
aFile = DefineEncoding(AFile.MidB(bomLength + 1), Encdng)
ElseIf Encdng.IsValidData(aFile) = False And left(aFile,1) = Encdng.Chr(&hFEFF) then
aFile = Mid(aFile, 2)
//aFile = ConvertEncoding(aFile, Encdng)
MsgBox "The “+ typ + " File has been Converted to UTF8, And the BOM Is Correct. It Might Be Damaged.”
[/code]
Thanks to both Tim. Back to “harpoons” or “?” and “?”.
Could the type Text be different from in this case?
I have been reading pieces about it. I have the XDEV Mag set. Do you know good articles?
I could then eventually try internet styled markup again.