Code Monkey home page Code Monkey logo

Comments (7)

vikingsc2007 avatar vikingsc2007 commented on May 23, 2024 1

Same problem on Windows10 1901 (language zh-cn)

You need PowerShell UTF-8 Support

Open your powerShell ,Execute command New-Item $PROFILE -ItemType File -Force
Then open result url .ps1 file in notepad ,append [System.Console]::OutputEncoding=[System.Text.Encoding]::GetEncoding(65001)
Back to your powerShell, Execute command Set-ExecutionPolicy Unrestricted

from templater.

SilentVoid13 avatar SilentVoid13 commented on May 23, 2024

Hello @RrobertRr, thanks for reporting this issue !
Could you specify in what context you want to be using emojis ? What is the associated command for your template ?

from templater.

unstppbl avatar unstppbl commented on May 23, 2024

Hello @SilentVoid13 , the template is {{weather}}, and for it to work on Windows 10 I had to change the command a bit:

powershell ((Invoke-WebRequest -UseBasicParsing -Uri wttr.in/Astana?format=3).Content)

But it shouldn't affect the emojis, so I assume the problem is in Templater plugin.

The output of the template:
image

from templater.

unstppbl avatar unstppbl commented on May 23, 2024

I tried to use regular expressions to replace emojis part, but degree symbol is also not supported

from templater.

SilentVoid13 avatar SilentVoid13 commented on May 23, 2024

Hi @unstppbl, it looks like powershell does not like emojis, tried running the command from a powershell shell and not from obsidian, and got a bunch of junk like you did.
Tell me if you find a solution for this, but I think that it's just not possible to use emojis in powershell.

from templater.

luckman212 avatar luckman212 commented on May 23, 2024

Found a solution: #15 (comment)

from templater.

SilentVoid13 avatar SilentVoid13 commented on May 23, 2024

As @luckman212 said, unicode chars problems are not coming from Templater, but from cmd.exe and powershell.
I added some documentation on solutions to fix this problem: https://silentvoid13.github.io/Templater/docs/faq#unicode-characters-emojis--are-not-working-on-windows-
Closing this.

from templater.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.