Vivek on Nostr: Hey tyiu The following solution may possibly work. I am not an expert in iOS app ...
Hey tyiu (npub1yau…vjmf)
The following solution may possibly work. I am not an expert in iOS app development (in fact never done it). So, please take what I say with a pinch of salt :D
The call flow in damus goes like this from my preliminary analysis of the code on Github 👇
```
damus.c :: parse_hashtags ==>
cursor.h :: consume_until_boundary ==>
cursor.h :: is_boundary
```
I believe the fix is to change how the `is_boundary` function is implemented in damus.
When we look at the implementation of hashtags from the other clients, the regular expression based matching does not have any check for alphanumerics, but instead just a set of 'prohibited characters' (a black list)
Amethyst regex is this:
```java
"#([^\\s!@#\$%^&*()=+./,\\[{\\]};:'\"?><]+)(.*)"
```
Snort regex is this:
```js
/(#[^\s!@#$%^&*()=+.\/,\[{\]};:'"?><]+)/
```
Both of these regexes try to just write a blacklist of chars that can't be there in a hashtag, instead of whitelisting alphanumerics.
If, in c code, we can come up with a function that will check for blacklisted characters and return a boolean, we could use this to implement international hashtags in damus too.
Not sure if my theory is correct.
The following solution may possibly work. I am not an expert in iOS app development (in fact never done it). So, please take what I say with a pinch of salt :D
The call flow in damus goes like this from my preliminary analysis of the code on Github 👇
```
damus.c :: parse_hashtags ==>
cursor.h :: consume_until_boundary ==>
cursor.h :: is_boundary
```
I believe the fix is to change how the `is_boundary` function is implemented in damus.
When we look at the implementation of hashtags from the other clients, the regular expression based matching does not have any check for alphanumerics, but instead just a set of 'prohibited characters' (a black list)
Amethyst regex is this:
```java
"#([^\\s!@#\$%^&*()=+./,\\[{\\]};:'\"?><]+)(.*)"
```
Snort regex is this:
```js
/(#[^\s!@#$%^&*()=+.\/,\[{\]};:'"?><]+)/
```
Both of these regexes try to just write a blacklist of chars that can't be there in a hashtag, instead of whitelisting alphanumerics.
If, in c code, we can come up with a function that will check for blacklisted characters and return a boolean, we could use this to implement international hashtags in damus too.
Not sure if my theory is correct.