Jump to content

Recommended Posts

Posted

I use _ClipPutHTML UDF function 

My problem is that I am not able to write characters with accets.

When I paste this code to an Mail program the accent characters will be Chinese characters or '???' characters.

Here is a snippet of my code:

#include <_ClipPutHTML.au3>

$sHTMLStr='<html><head>'&@CRLF & "  <title>Page Title</title>"&@CRLF & _
'  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'&@CRLF & _
"</head>"&@CRLF & "<body>"&@CRLF & "<h1>Headline Text</h1>"&@CRLF & _
"<p>" & "ófiéááéllááéáéá:" & Chr(225) & BinaryToString("á",4) &@CRLF & _
'<a href="http://www.autoitscript.com/forum/index.php?showtopic=96556">_ClipPutHTML() functions</a>.'&@CRLF& _
" The regular modifiders, such as <strong>bold</strong>, <i>italics</i>, and <u>underlines</u> work as usual,"&@CRLF& _
" just like all other HTML formatting.</p>"&@CRLF & "<p>&nbsp;</p>"&@CRLF & _
"<p><strong>Here's an example list:</strong></p>"&@CRLF & "<ul>"&@CRLF & _
"   <li>List <i>itemü</i> #1.</li>"&@CRLF & _
"   <li>List <i>itemá</i> #2.</li>"&@CRLF & _
 '  <li>List <i>itemé</i> #3 with a <a href="http://www.google.com">Hyperlink</a></li>'&@CRLF & _
"</ul>"&@CRLF & "</body>"&@CRLF & "</html>"

$sPlainTextStr="Headline Text"&@CRLF&@CRLF& _
"ófigyeljáéáéá" & Chr(225) & "_ClipPutHTML() functions."& _
"The regular modifiders, such as bold, italics, and underlines work as usual, just like all other HTML formatting."&@CRLF&@CRLF& _
"Here's an example list:"&@CRLF& _
"    * List itemü #1."&@CRLF& _
"    * List itemá #2."&@CRLF& _
"    * List itemé #3 with a Hyperlink"&@CRLF

;I have tired this way, but it does not work.
;$UTF8HTML = BinaryToString($sHTMLStr,4)
;ConsoleWrite($UTF8HTML)

;$sUTF8String=BinaryToString($sPlainTextStr,4)
ConsoleWrite($sUTF8String)

_ClipPutHTML($UTF8HTML,$sUTF8String)

; Special Unicode text call
;_ClipPutHyperlink("http://www.google.co.jp/",ChrW(0x30B0)& ChrW(0x30FC)& ChrW(0x30B0)& ChrW(0x30EB)& " (Japanese Google)")
; Regular text
;_ClipPutHyperlink("http://www.google.com","itt")

 

  • Moderators
Posted

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...