i am facing an issue on cisco ip phones, when trying to display arabic characters it displays corrupted as ???????? so i was wondering How to display arabic correctly on ip phones ?
Issue fixed using the following code:
String newStr=new String(
str.getBytes("iso-8859-1"), "utf-8");
Related
I have set up a webserver and connected a dns with the domain shown bellow to it. The Problem is that when I copy and paste the domain it changes to a weird string, as shown bellow.
The original domain i used is "https://negertöter.de" and it changes to "https://xn--negertter-57a.de/".
Is this because of the "ö" or what's the problem, can i fix this or do i have to register a new domain without the "ö" to get rid of the problem?
Thank you!
What you see is ok and works as designed. What you see is not a "weird" string, it is the ASCII representation of Internationalized Domain Names aka IDNs which are domain names using characters outside of the ASCII range.
You can search for IDNA specification to understand more about that.
Browsers support it differently depending on the TLD and the characters in the domain name. For security reasons, they may not display the IDN in "Unicode" form and fall back to ACE (ASCII Compatible Encoding) form as you witnessed.
You don't have to register anything else, xn--negertter-57a.de is the correct ASCII representation per IDNA specification of IDN negertöter.de.
Your registrar, DNS provider, and/or website provider should be able to explain things further and guide you as needed.
I was presented with the task of hiding telephone numbers from Google - what that means is, we want to display them on the website and have them clickable href="tel:..." but to ensure Google does not index it and does NOT display it with the search results.
Does anyone know of any effective technique?
I was thinking of writing VueJs component, which mixes given number with some alpha characters, but this would only work with the presentation / label, the tel:... would still have to have a valid telephone number and I'm not sure if Google wouldn't pick it form the href attribute.
I think the best approach is just to hide it from bots, may be you can use something like this VueIfBot
<vue-if-bot>
This will not be visible for bots
</vue-if-bot>
or any other alternative just check the userAgent for example in php
function _bot_detected() {
return (
isset($_SERVER['HTTP_USER_AGENT'])
&& preg_match('/bot|crawl|slurp|spider|mediapartners/i', $_SERVER['HTTP_USER_AGENT'])
);
}
If you can't get userAgent, but you still want to check if this is a search engine crawler you can check user IP adress here is a list of IP Addresses of Search Engine Spiders
And finally after you successfully hide your data you can test it with User-Agent Switcher
I am trying to display the server name of my server in commented region.
I can display the server name however, we are not allowed to display the whole server name.
i am using following code to display the server name that can be read in page source view..
<!--<%=Environment.MachineName%>-->
It displays the whole machinename, is there a way i can display just the last 4 digits of the server name....
as machinename is an ordinary string, this one should solve your problem
<%=Environment.MachineName.Length > 4 ?
Environment.MachineName.Substring(Environment.MachineName.Length-4,4) :
Environment.MachineName %>
This is what I used
<!--<%=Environment.MachineName.Substring(Environment.MachineName.Length-4)%>--> It works the way I want
I am working on a XPage application which will work on both web and client. There is an action which will adjust the date object to 20 days and store it again in the current document. I got an issue, that the code is working perfectly on web and win-xp OS XPinC. I found that there is an issue with win-7 XPinC. And compare with two different win7 machine for the same document. But working on PC but not in another. Finally concluded with that the issues is due to the current machines datetime settings. But I cannot go and check/change all the pc's datetime format. Please advice how can I handle this.
Thanks in advance.
This has been doing my head in for several days.
Xpages works great in my browser, but the date/time is all screwed up when viewed in LN.
The solution is to go into "File" -> "Preferences" and then "Regional Settings".
Change "Content Language" from "English" to "English (United Kingdom)".
A pet hate of mine is that most computers default to the crazy US way of displaying the date, i.e. month/day/year when the rest of the world uses day/month/year.
I have a URL stored in a Sharepoint 'Link to a document' that contains the Nordic Character 'Ø' as hex(%D8). Sharepoint is encoding the % symbol, (thus making it %25D8).
If I enter the URL directly into an address bar, it works fine.
If I don't URL encode it, I still get the same problem.
Anybody got any ideas?
So what happens if the URL is stored as 'Ø' in the URL instead of already having it encoded?
Also do you have any special process running that stores it for you? Because if you don't have any custom code interacting with this, this is probably better asked on serverfault.com.