Combine Two String in different Language RTL & LTR

北城余情 提交于 2019-11-27 14:40:59

I'm pretty sure that the problem here is that the hebrew date in strDate is carrying unicode characters that make it display right-to-left. That's causing chaos when combined with the 'ordinary' left-to-right string in timeForResponse. The date formatter is picking that up from the hebrew locale.

Try this:

  1. Change your date format string to

[dateFormatter setDateFormat:@"dd.MM.yyyy,EEEE"];

  1. Change your string with format to

NSString *result = [NSString stringWithFormat:@"\u200E%@ | %@", timeForRequest, strDate];

The 0x200E unicode character is invisible but puts the rendering back into left-to-right mode.

After the above, this is the output that I'm getting:

07: 00-16: 00 | 17.08.2016,יום רביעי

I just had to change from Debug to Release and Install the Release .exe, now both services are running and working without any problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!