Comments (8)
I'll have a play - I've just looked in the NI Unicode tools and there is a wrapper for a private primitive which is text to UTF-8 and appears to be cross-platform.
Sounds like what we would need but perhaps there are limitations?
Alternatively I can copy their method for ASCII to UTF-16 using Windows calls at least - I can see the correct options now and wrap then on the Rust side where there are easier conversions from UTF-16 to UTF-8 (the internal representation required)
from g-cli.
Thanks Olivier - one of those simple things that are so complicated!
I'll take a look at what I can do to support the extended ASCII tables.
You probably have more experience with this than myself so any hints? I presume LabVIEW just uses the active code page in Windows?
from g-cli.
I didn't dive into the code to see where the issue was. So, I haven't ideas how to fix it properly.
From a user standpoint, I'm fine if extended characters are not displayed. I'm sure your time could be more valuable on other issues.
IMO, the important thing is not to be stopped by an extended character.
from g-cli.
Ah no worries, wasn't sure if it is something you might have come across elsewhere. Turns out extended ASCII like LabVIEW is a minefield for compatibility
We can definitely make it robust to this as you say. There are 3 options to consider:
- Simplest is to do a lossy conversion to UTF8 in Rust.
- We can convert to UTF8 in LabVIEW. There appears to be a function for this in described at https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z00000159jOSAQ&l=en-GB
- We can convert from ExtendedASCII to UTF8 in rust. There is an encoding library but we would have to determine the current code page from the Windows API - and consider cross platform concerns
I'm inclined towards 2 although sounds like the tools provided just wrap the Windows API so perhaps should be 3 and we can use them to ensure we are calling the correct methods.
from g-cli.
I'm not sure 2 will work. If I remember, that was the first thing I tried, and it was unsuccessful.
from g-cli.
Nice. If you want me to test something, just let me know.
from g-cli.
Related Issues (20)
- Linux Support HOT 1
- Include a LabVIEW Cache Clearing Tool
- Application is crashing when started with -unattended (LV2021) HOT 2
- Improve Proxy Error Handling
- Restructure Main Loop for Multiple Message Sources HOT 1
- Ctrl-C Handling HOT 1
- Strange Pause/Hang When Calling v3 proxy from Gitlab HOT 10
- More User Friendly Debug Strings
- CI Performance HOT 1
- Review TCP Disconnection
- VI runs in wrong bitness of LabVIEW if it is already open HOT 10
- Allow calling VIs in PPLs HOT 5
- Improve Documentation HOT 4
- g-cli crashes if LabVIEW 2022 Q3 is installed HOT 8
- Need to Install New vip for integration test HOT 1
- Handle NI Service Locator Not Running HOT 1
- Unhandled exception when running g-cli or labview-cli HOT 2
- Fix Github action warnings HOT 1
- G-CLI 3.0.0-beta1 prefers 64 bit version if no --lv-ver HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from g-cli.