Error encoding UTF-8 in netbeans-13 with jdk 1.8 - netbeans

How can I fix this problem with netbeans13 in window10? I'm using JDK 1.8 also JRE I am learning web applications with java. The problem start is when I type ư (Vietnamese character) into the editor, it starts to convert in to ?. How can I fix this?
I tried to add -J-Dfile.encoding=UTF-8 to netbeans.conf, restart Netbeans, install again and again, but it seem not working.
<<script language = "JavaScript">
var Ten, Tuoi; // Khai bao 2 bien de luu ten va tuoi
Ten = prompt("Bạn hãy nhập vào tên ", "");
Tuoi = prompt("Bạn hãy nhập vào Tuổi : ", 20);
document.write("Chào bạn : <B> " + Ten + "</B>");
document.write("<BR>"); // Xuống dòng
document.write("Tuổi của bạn là : <U> " + Tuoi + "</U>");
//i can paste "Tuổi của bạn là :" but cant type tu?i c?a b?n là
enter image description here

Related

FabricJS Android Webview Newlines showing as \n

So I load a basic page with the canvas and everything seems to work except newlines are shown as \n
here is the body as a java method:
input = StringEscapeUtils.unescapeShell(this.getData());
private String htmlBody(String input){
return "<html><head>" +
"<link href=\"fonts.css\" type=\"text/css\" rel=\"stylesheet\" />" +
"<script src=\"jquery.min.js\" type=\"text/javascript\"></script>" +
"<script src=\"fontfaceobserver.js\" type=\"text/javascript\"></script>" +
"<script src=\"fabric.min.js\" type=\"text/javascript\"></script>" +
"<style type=\"text/css\">" +
".canvas-container {" +
"margin: 0 auto;" +
"}"+
"</style>" +
"<script src=\"javascript_fabric.js\" type=\"text/javascript\"></script>" +
"</head><body>"+
"<div id=\"sb2div\" class=\"row\" style=\"margin: 0 auto!important; max-height: 100vh\">" +
"<canvas id=\"fabricjs-branding\" width=\"600\" height=\"600\" style=\"margin: auto!important;\"></canvas>" +
"</div>" +
"<script>" +
"$(document).ready(function(){" +
"setUpBranding();" +
"var o = " + input + ";" +
"console.log(o);" +
"fabricjscanvas.loadFromJSON(o);"+
"});" +
"</script>" +
"</body></html>";
}
setUpBranding() does my initialization of fabricjscanvas which does add some feature prototypes but the issue has nothing to do with them.
itext and textbox are standard using the current release 4
on the desktop using the same setup everything is fine...
based on a comment i found the newline characters were not getting unescaped with the rest of the json data... strange but I was able to fix it using the Java String Replace method... after using the StringEscapeUtils.unescapeShell
input = StringEscapeUtils.unescapeShell(this.getData());
input = input.replace("\\\\n", "\\n");

Using MailApp sendEmail in shared application

I have an google web app that uses the send mail function, it works but when users use it, emails are sent automatically from my account, I want to know if there is a possibility that emails are sent from the account who uses the app.
I initially deployed the application by setting it :
Execute the app as : Me (my account)
Who has access to the app : Any member of company domain
I later reconfigured the application as follows
Execute the app as : User accessing the web app
Who has access to the app : Any member of company domain
Other permissions were then requested to users, everyone naturally accepted, but the application blocks.
This definitely should be possible, because there are lots of applications like Outreach.io, Hubspot, Autopilot, and FrontApp that have users connect their G Suite account in order to use that infrastructure for sending.
Can you further explain what you mean by "the application blocks"?
What happened regarding the email send once you made the changes to send from the User accessing the Web App? Was there no change or did it throw an error?
Do you have a copy of the email in your G Suite or Gmail inbox that was sent via the Web App? If so can you go to "Show Original" and copy paste the header information into this thread? This info will allow me to quickly assess a little more information about the sending infrastructure. Be aware that the "Show Original" information cannot be from a forwarded email.
Peace,
-LB
There was an unused library that was hanging in the project, also the fact that I could not empty the some manifest file,
So I deleted the entire project from the cloud, and I redid the script again, being very careful about everything I did,
Finally I shared the application, and users were finally able to send emails, which were sent from their own accounts,
I thank you very much for your intervention, you were right, I put the entire script online, it can be useful for others,
I just specify that the script pick data from the sheet, puts it in a table, and adds a signature with animated gif images,
function sendemail(id) {
var rw = parseInt(id);
var agent = Session.getActiveUser().getEmail();
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Saisie");
var des = sheet.getRange(rw,8).getValue();
var eml = sheet.getRange(rw,9).getValue();
var dat = Utilities.formatDate(new Date(), "Europe/Paris", "dd/MM/yyyy");
var typ = sheet.getRange(rw,5).getValue();
var nbo = sheet.getRange(rw,6).getValue();
var obj = sheet.getRange(rw,7).getValue();
var num = sheet.getRange(rw,4).getValue();
var soc = sheet.getRange(rw,11).getValue();
var nom = sheet.getRange(rw,12).getValue();
var adr = sheet.getRange(rw,13).getValue();
var vil = sheet.getRange(rw,14).getValue();
var pay = sheet.getRange(rw,15).getValue();
var company = DriveApp.getFileById('abcd').getBlob().setName("company");
var departement = DriveApp.getFileById('abcd').getBlob().setName("company");
var userName = getUserInfo(agent);
var msg = '<html><head><meta charset="utf-8">' +
'<style>table{border-collapse:collapse;}td{border: 1px solid black;padding-left:4px;}.tete{background-color:#f6f6f6;text-align:center;}.titre {background-color:#ebffce;}</style>' +
'</head><body>Bonjour,<br><br><table style="width:100%;"><tr><td colspan="2" class="tete">Réception d&apos;objet à l&apos;attention de « <span style="color:#0900c6;">'+ des + '</span> »</td></tr>' +
'<tr><td width="140" width class="titre">Date de réception</td><td>'+ dat +'</td></tr>' +
'<tr><td class="titre">Objet & Nombre</td><td>'+ obj + ' - ' + nbo + '</td></tr>' +
'<tr><td class="titre">Type Transport</td><td>'+ typ + '</td></tr>' +
'<tr><td class="titre">N° Transport</td><td>'+ num +'</td></tr>' +
'<tr><td colspan="2" class="tete">Info Expéditeur</td></tr>' +
'<tr><td class="titre">Société</td><td>'+ soc +'</td></tr>' +
'<tr><td class="titre">Collaborateur</td><td>'+ nom +'</td></tr>' +
'<tr><td class="titre">Adresse</td><td>'+ adr +'</td></tr>' +
'<tr><td class="titre">Ville - Pays</td><td>'+ vil + ' ' + pay + '</td></tr></table><br>' +
'Cordialement, '+ userName +' - Service Courrier.<br><br>' +
'<table style="border-collapse:collapse;"><tr>' +
'<td rowspan="2" style="text-align:center;border: 1px solid black;"><img src="cid:logocompany"></td>' +
'<td style="text-align:center;border: 1px solid black;"><img src="cid:logodepartement"></td>' +
'</tr><tr><td style="text-align:center;border: 1px solid black;padding:4px;"><div style="text-align:center;">' +
'12 Place de la République - 75123 Paris Cedex 10<br>Tél. : 02 44 44 44 44 - Fax : 02 55 55 55 55<br>Email : '+agent+'</div></td></tr></table></body></html>';
MailApp.sendEmail({
to: eml,
subject: "Message Automatique Service Courrier",
htmlBody: msg,
inlineImages:{
logocompany: company,
logodepartement:departement
}
});
}

If/Else statement in Katalon Studio

I'm try to do this statements but not successful. Can anyone help me. Thank you alot
if (WebUI.verifyTextPresent('Nhân viên hiện không rảnh trong khung giờ này', true) {
WebUI.waitForAlert(2)
WebUI.click(findTestObject('Page_Trang Qun L (1)/FailConfirm'))
WebUI.closeBrowser()
} else {
WebUI.waitForAlert(3)
WebUI.click(findTestObject('Page_Trang Qun L (1)/ThemButton'))
WebUI.waitForAlert(2)
WebUI.click(findTestObject('Page_Trang qun tr SkyAdmin/button_OK'))
WebUI.waitForAlert(2)
WebUI.closeBrowser()
}
The second parameter of the WebUI.verifyTextPresent() says if the first parameter is a regular expression.
See https://docs.katalon.com/display/KD/%5BWebUI%5D+Verify+Text+Present.
I do not speak your language, but the text doesn't seem like a regex.
Try changing WebUI.verifyTextPresent('Nhân viên hiện không rảnh trong khung giờ này', true) to WebUI.verifyTextPresent('Nhân viên hiện không rảnh trong khung giờ này', false).

MIssing EfTextTemplateHost

Applying Reverse Engineer Code first, appears this bug:
Compiling transformation: No se puede encontrar el tipo o el nombre de espacio de nombres 'EfTextTemplateHost' (¿falta una directiva using o una referencia de ensamblado?)
Any suggestion ??
EfTextTemplateHost is part of the EF Powertools. So make sure it is installed correctly.
Add this to to the T4 file and change the placehoders [] to match your system:
<## assembly name="C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\[vsVersion]\Extensions\[extensionHash]\EFPowerTools.dll" #>

ColdFusion and Unicode Characters Issues

Working on the Globalization of the Coldfusion website using the i18n.
I am using the resource files rather than database..
In my one of the string files, i have the value being displayed as:
Inicia sesión con tu nombre de usuario y contraseña.
and when i run on my browser, it is displayed as:
Inicia sesi�n con tu nombre de usuario y contrase�a.
Having read the below link, i have enabled the utf through cfprocessingdirective and the meta tag also, but i am not sure why it is still displaying it like this.
ColdFusion character encoding issue
I used the Google translate to translate the above English to Spanish.
Using this in my Application.cf also:
<cfset setLocale("English (US)")>
<!--- Set the session page encoding --->
<cfset setencoding("URL", "utf-8")>
<cfset setencoding("Form", "utf-8")>
Update #1
I cannot Update, but i am adding here:
spanish:
username=Nombre de usuario
login=Inicia sesión con tu nombre de usuario y contraseña.
appName=Inventory Manager
rem=Acuérdate de mí
slogin=Iniciar sesión
errorLoginMsg=Error! Credenciales de login fallidos, Inténtalo de nuevo
ser='Nombre de usuario' es un campo obligatorio.
ser1='Password' es un campo obligatorio.
nitem=Nuevo elemento
ilist=Lista de artículos
order=Orden
olist=Lista de Pedidos
sell=Vender
slist=Lista de Ventas
quote=Cotizaciones
qlist=Lista Cotizaciones
rs=Vuelto Vendido
inv=Factura
Russian File it is ru.rtf
username=Имя пользователя
login=Войти с именем пользователя и паролем.
appName=Inventory Manager
rem=Запомнить меня
slogin=войти
errorLoginMsg=Ошибка! Учетные данные для входа не удалась, попробуйте еще ​​раз
ser='Имя' является обязательным полем.
ser1=Поле 'Пароль' является обязательным.
nitem=Новый элемент
ilist=Список статей
order=Заказать
olist=Список Заказать
sell=Продать
slist=Список продажам
quote=Цитаты
qlist=Котировки Список
rs=Продано Возвращается
inv=Счет