Hi
how can i replace a middot "·" (ISO-8859-1: hex B6, dez 183) in a string (e.g. line1) with a comma "," ?
StringReplace, line1, line1, ·,% ",", All
does not match
regards
Max
how to replace a middot "·" Topic is solved
-
- Posts: 302
- Joined: 05 Feb 2017, 00:03
Re: how to replace a middot "·"
This appears to work for me:
Edit: So does your initial code actually. So not sure my version is any better.
Code: Select all
line1 := StrReplace(line1, "·", ",")
-
- Posts: 87
- Joined: 25 Jun 2017, 02:18
Re: how to replace a middot "·" Topic is solved
ThxNightwolf85 wrote:This appears to work for me:Edit: So does your initial code actually. So not sure my version is any better.Code: Select all
line1 := StrReplace(line1, "·", ",")
That code works
Best regards
Re: how to replace a middot "·"
@Maxsteinfeld: Your original code works for me, although I would recommend to use StrReplace, as StringReplace won't be available in AHK v2.
One possibility is that the character looks like Chr(183) but isn't, so I would check the char number for each character, see 'LIST ALL CHARACTERS THAT APPEAR IN A STRING' here for an example:
jeeswg's characters tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=26486
Btw I was wondering about hex and 'dez', although it looks like 'dez' may be German for 'dec'.
Code: Select all
q::
line1 := "a·a"
line1 := StrReplace(line1, Chr(183), ",")
MsgBox, % line1
line1 := "a·a"
StringReplace, line1, line1, ·,% ",", All
MsgBox, % line1
return
jeeswg's characters tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=26486
Btw I was wondering about hex and 'dez', although it looks like 'dez' may be German for 'dec'.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
-
- Posts: 87
- Joined: 25 Jun 2017, 02:18
Re: how to replace a middot "·"
Hi Jeeswg,
you are right - no idea why the line:
StringReplace, line1, line1, ·,% ",", All
had not worked for me - it works now
(perhaps i do not reload the script)
and many thanks for the links
regards
Max (German)
you are right - no idea why the line:
StringReplace, line1, line1, ·,% ",", All
had not worked for me - it works now
(perhaps i do not reload the script)
and many thanks for the links
regards
Max (German)