Giter VIP home page Giter VIP logo

Comments (7)

viandmarket25 avatar viandmarket25 commented on May 18, 2024 3

Use this
Make sure to

import 'dart:convert';

Convert your key to ascii code
Eg:
//your key is probably an unaccepted string

Var myKey= key.codeUnitAt(0).toString();
Then,
hiveBox.put(myKey,values);

To retrieve your values Do the same thing,
Var myKey=key.codeUnitAt(0).toString();
Then,
hiveBox.get(myKey);

//results your values

from hive.

bolasim avatar bolasim commented on May 18, 2024 1

Nevermind them. I made all the strings ascii and kept the values Unicode and it seems to work well.
Thank you for the quick feedback.

from hive.

viandmarket25 avatar viandmarket25 commented on May 18, 2024 1

If it works for you, lemme know if it doesn't also lemme know with your error logs to help better

from hive.

simc avatar simc commented on May 18, 2024

Keys have to be ASCII. Could you share a key value pair which is not working?

from hive.

hamza-sabri avatar hamza-sabri commented on May 18, 2024

how did you do that?
am facing the same problem here whenever am trying to save Arabic string what should I do?

from hive.

themisir avatar themisir commented on May 18, 2024

how did you do that?
am facing the same problem here whenever am trying to save Arabic string what should I do?

Hive only accepts ASCII characters as entry keys. But this limitation does not applies to values.

box.put('non-ascii-key', '...');        // will not work
box.put('ascii-key', 'non-ascii-value'); // will work

from hive.

themisir avatar themisir commented on May 18, 2024

Anyways posting error logs will help to better understand the issue.

from hive.

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.