Search found 111 matches

by peceha
Tue Jan 16, 2018 12:21 pm
Forum: Hollywood bugs
Topic: COMPARESTR gives different results on different platforms
Replies: 2
Views: 464

COMPARESTR gives different results on different platforms

Code: Select all

Print (CompareStr("d","dupa",FALSE))
Wait(200)
Hi,
when run on PC: -1
when run on MorphOS 3.9, PowerMac: 0

Image
by peceha
Tue Oct 10, 2017 9:37 pm
Forum: Newbie questions
Topic: I'm lost with all the text encoding stuff...
Replies: 12
Views: 3390

Re: I'm lost with all the text encoding stuff...

The above solution helped only in situation when I convert the whole file (second script) - but it didn't help when I want to look for text in the file (script below) - it still doesn't find "$00" - so I have to thing about some substitutes :D @OPTIONS {Encoding = #ENCODING_ISO8859_1} tbl = { ["a"] ...
by peceha
Tue Oct 10, 2017 8:17 pm
Forum: Newbie questions
Topic: I'm lost with all the text encoding stuff...
Replies: 12
Views: 3390

Re: I'm lost with all the text encoding stuff...

Well... no need for any substitutes :D there was a mistake in my script - I looked into documentation for hexStr() and what I saw at the end was: This will return the string "$FF". and I assumed that hexStr() always gives the text with 3 letters, like: "$00", "$0A" - but that is not true. It gives: ...
by peceha
Tue Oct 10, 2017 4:16 pm
Forum: Newbie questions
Topic: I'm lost with all the text encoding stuff...
Replies: 12
Views: 3390

Re: I'm lost with all the text encoding stuff...

That article made my head explode :)

But thanks for explanation.
I think I will try to catch "$00" and use a substitute somehow - will see if I can manage that,

Thanks
by peceha
Tue Oct 10, 2017 9:17 am
Forum: Newbie questions
Topic: I'm lost with all the text encoding stuff...
Replies: 12
Views: 3390

Re: I'm lost with all the text encoding stuff...

Yet another example: opo = { ["$00"] = "v", ["$04"] = "ö", ["$08"] = "w", ["$20"] = "z", ["$47"] = "_", ["$4E"] = " ", ["$57"] = "A", ["$58"] = "a", ["$60"] = "b", ["$68"] = "c", ["$74"] = "ä", ["$78"] = "e", ["$7F"] = "F", ["$80"] = "f", ["$88"] = "g", ["$8F"] = "H", ["$90"] = "h", ["$98"] = "i", [...
by peceha
Mon Oct 09, 2017 9:02 pm
Forum: Newbie questions
Topic: I'm lost with all the text encoding stuff...
Replies: 12
Views: 3390

Re: I'm lost with all the text encoding stuff...

https://image.ibb.co/kgaeBG/Clipboard_Image.png As seen on the picture: letter [o] is at position: 232043 and it doesn't matter if I look for "vom HSV" or "om HSV" - I always have the same position. I think it may have something to do with my new problem from post above (cannot find the whole phras...
by peceha
Mon Oct 09, 2017 8:19 pm
Forum: Newbie questions
Topic: I'm lost with all the text encoding stuff...
Replies: 12
Views: 3390

Re: I'm lost with all the text encoding stuff...

@OPTIONS {Encoding = #ENCODING_ISO8859_1} this helped !!!!!! thanks!!! But now there is another problem: one of the letters is represented by "$00" (letter "v") and when I want to find eg: "ist Fan vom HSV" -> it finds nothing "ist Fan v" -> it finds such string "vom HSV" -> also finds that string (...
by peceha
Mon Oct 09, 2017 7:45 pm
Forum: Newbie questions
Topic: I'm lost with all the text encoding stuff...
Replies: 12
Views: 3390

Re: I'm lost with all the text encoding stuff...

one line got lost

Code: Select all

For Local i=0 To StrLen(s$)-1
   Local idx=MidStr(s$,i,1)
	sR=sR..Chr(tbl[idx])   <------------------------------ I missed that line
   hexChain=hexChain..hexstr(tbl[idx]).." "
Next

by peceha
Mon Oct 09, 2017 6:24 pm
Forum: Newbie questions
Topic: I'm lost with all the text encoding stuff...
Replies: 12
Views: 3390

I'm lost with all the text encoding stuff...

Hello, I have a file (binary, from a game) and I would like to replace some part inside - easy.... no :D tbl = {["a"] = $58,["c"] = $68,["e"]= $78,["g"] = $88,["h"]= $90,["k"] = $A8,["n"]= $C0,["t"] = $F0,["u"]= $F8,[" "]= $4E,["_"]= $47} OpenFile(1,"org_bidat") Local size=FileSize("org_bidat") Loca...
by peceha
Sun Oct 08, 2017 7:13 pm
Forum: Showcase
Topic: My new documentation site and about where I'm heading :)
Replies: 81
Views: 20833

Re: My new documentation site and about where I'm heading :)

So... I have it working :)

this is what must be added to almost every function handling strings:

Code: Select all

#ENCODING_ISO8859_1
Thanks