I want to display characters using form in PlayFrameWork - play-framework-2.7

Implement form and input in scala.html
Enter characters there
I want to display that character

Related

Displaying foreign characters on the website

I have a small list in a foreign language and I am able to display the special foreign characters on the website I am updating. For example to display ü on the website, I write ü in the file. Or to display ö, I write ö in the file. And they are displayed correctly. So far no problems. But now I must also display the character β. Can you just write me the code for it in that same set? Or better yet, tell me where can I find the corresponding character? such as in a list? what is the name of the list I must look at? Again, I want to display character β on a website, by writing the corresponding special character on the source file, just like I am writing ü to display ü.
Mojibake is what's happening, because your text editor use ISO 8859-1 to open and save the files, but your web server serve them to your user with UTF-8. You can confirm it with https://string-functions.com/encodedecode.aspx or other tools using encode set to ISO 8859-1 but the decode set to UTF-8.
The fix is to set your text editor to use UTF-8.

How to display and read a float in a non english (german) ionic 3 app?

In an ionic 3 app I am currently trying to get a floating point number as user input. Since the application is exclusively targeting a german audience I am expecting input with a comma as the decimal separator, e.g. 750,5.
In addition I would like to open the numerical keyboard.
I tried including an input field with type="text". I parsed the resulting input string using a custom parsing method, which respects the different decimal separator.
Since the input field has a two way binding and the application might change the number itself I convert the number to a string using the Angular decimal pipe like so:
numberString = new DecimalPipe('de').transform(value.count, '1.0-2');
That worked well, however the app always opens the full alphanumerical keyboard.
To show the numerical keyboard I used the input field with type="number".
<ion-input type="number" step="any"></ion-input>
Using this, the numerical shows as expected. However the input field now includes thousand separators. For example if I type 7500, the input field displays 7,500 using the English decimal separator.
Now I am not sure where this problem is caused but the app itself seems to be running under an English locale although the device is set to German. I expect the problem to be solved by setting the web view locale to German. How could I achieve this?

Replace Text in a textfield with Image

I have a form on my website.
Inside this form a some emoji buttons.
If a user clicks one of this buttons they add an emoji to a <textfield>,
but they look like this " :) ".
So how can i replace the :) Emoji with images.
Example: If a user click a button it should add <img src="img/emoji/1.png"> and display it.
Use the UTF8 characters for the emoji's. Since the UTF8 emoji's are considered text characters, you don't need to use any HTML for this, and they will render in normal textarea's and text input's without anything special.
Here's a reference for some unicode UTF8 emoji's. In your buttons code, replace the ;) or whatever with the code for the UTF8 symbol-- for example on the table in the link it shows the code U+1F600 for a smiley face. In your script you want to say it as \u1F600 in quotes. This will render the emoji character. Most browsers, especially on mobile, have good support for these characters, but you can bolster that by importing an emoji font using css.
http://www.unicode.org/emoji/charts/full-emoji-list.html
Addendum: You can even cut and paste UTF8 emoji's directly into your code. Since they are valid characters in UTF8, they are valid code.. you could even use them in variable names 😎

sending data from checkbox form to next page as string

I have a list of names that you can tick box to select favourites and then submit the form and it goes to next page to display the short-list.
I need the selected names to send through as .asp?T=Name&Name&Name then only show those artists by using
`strType = Request.QueryString("T")`
with the query
WHEREActNamelike '%"&strtype&"%'
is this possible
The names are originally pulled from a database so generated in loop
how do i do this please?
Thankyou
Michelle
Do not use the & Symbol to separate characters in a querystring. The & symbol is defined as a type of reserved character in urls (See Here http://www.456bereastreet.com/archive/201008/what_characters_are_allowed_unencoded_in_query_strings/).
I would recommend using an underscore as your seperator between values and then using the VBScript Split function to achieve the result you want. See Here for more info on Split: http://www.w3schools.com/vbscript/func_split.asp

How to make Zend_Form display special characters in text elements?

I am using a Zend_Form subclass to add and edit records in a database. The layout has iso-8859-1 encoding and charset. The table records use latin1_spanish_ci collation.
The form input text element doesn't display anything at all when the record contains special characters like accents. If there are no special characters the form input text element displays the record correctly. Curiously enough the special characters display correctly when they appear outside the text input field, for example inside an Html heading2 or a paragraph.
I have tried inserting the following in application.ini:
resources.db.params.charset=iso-8859-1
but I get an error message:
SQLSTATE[42000] [1115] Unknown character set: 'iso-8859-1'
I have also tried changing the db charset to utf8 in the same way. The form text element displays the string but I get strange characters instead of the original ones.
I have tried almost anything but I haven't solved the problem. It seems that text input elements generated with Zend_Form hate Latin characters.
Have you had the same problem?
I found this simple solution in a zf forum:
Add the following to your _initView function in bootstrap.php and forget about everything else:
$view->setEncoding('iso-8859-1');