Comments (3)
Can you please create a minimal compilable example without the QString/QChar dependency? Thanks.
from matio.
Can you please create a minimal compilable example without the QString/QChar dependency? Thanks.
@divyesh19399 Friendly reminder.
from matio.
The following code works for me as expected:
#include <string>
#include "matio.h"
int main() {
mat_t *pmat1 = Mat_CreateVer("test_5.mat", NULL, MAT_FT_MAT5);
mat_t *pmat2 = Mat_CreateVer("test_73.mat", NULL, MAT_FT_MAT73);
const char qstr[] = "\xCE\xA9"; // UTF-8 representation of the Greek letter Omega (0x03A9)
std::string dataString = "Gen Imp Drop (" + std::string(qstr) + ")";
size_t sz[2] = { 1, dataString.size() };
matvar_t *matString = Mat_VarCreate("charArray", MAT_C_CHAR, MAT_T_UTF8, 2, sz, (void *)dataString.c_str(), 0);
Mat_VarPrint(matString, 1);
Mat_VarWrite(pmat1, matString, MAT_COMPRESSION_NONE);
Mat_VarWrite(pmat2, matString, MAT_COMPRESSION_NONE);
Mat_VarFree(matString);
Mat_Close(pmat1);
Mat_Close(pmat2);
return 0;
}
and generates the following two files.
from matio.
Related Issues (20)
- Not able to build on Ubuntu 22.04.2 LTS HOT 1
- Compression failure caused by incorrect ChunkSize HOT 2
- Buliding with afl++ gives linker error `ld: unknown option: --retain-symbols-file` HOT 6
- A problem with corrupted files HOT 7
- Microsoft Windows minimal CMake configuration HOT 2
- HDF5 error on reading compressed v7.3 matfiles HOT 1
- cmake can not verify HDF5 version when building with VS 2022 HOT 1
- Methods to access data stored in nested variables in.mat file. HOT 2
- Failed to read from 7.3 mat file generated from hdf5storage python package HOT 6
- Does matio have documents just like API HOT 1
- Is matio capable of handle GBK string? HOT 1
- Using undefined types “matvar_internal” HOT 1
- cannot compile successfully on Windows HOT 1
- MinGW Build Regression HOT 4
- LFS support on MinGW broken HOT 4
- `READ_DATA` macro needs checks before float to int casts HOT 1
- loading sparse matrix with only null values in v4 format HOT 3
- saving structure in v7 format with compression HOT 7
- CAN it replace or just input one column date? HOT 1
- After make command get this error: missing binary operator before token "(" HOT 1
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 matio.