OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
Konstantin
Guest





PostPosted: Wed Aug 03, 2016 10:08 am    Post subject:
WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)
Reply with quote

Hi, Robert!


I've fixed a little encoding bug for OpenSceneGraph 3.4.0


std::fstream must be replaced by osgDB::fstream in src/osgDB/OutputStream.cpp.


OutputStream.cpp in attachment



KOS

------------------
Post generated by Mail2Forum
Back to top
Konstantin
Guest





PostPosted: Wed Aug 03, 2016 12:39 pm    Post subject:
WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)
Reply with quote

This patch can be wrong...


2016-08-03 13:07 GMT+03:00 Konstantin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi, Robert!


I've fixed a little encoding bug for OpenSceneGraph 3.4.0


std::fstream must be replaced by osgDB::fstream in src/osgDB/OutputStream.cpp.


OutputStream.cpp in attachment



KOS




------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10982

PostPosted: Wed Aug 03, 2016 1:24 pm    Post subject:
WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)
Reply with quote

On 3 August 2016 at 13:38, Konstantin <> wrote:
Quote:
This patch can be wrong...

Could you explain the nature of the original bug and what you think
might be wrong with the patch?


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Konstantin
Guest





PostPosted: Wed Aug 03, 2016 1:33 pm    Post subject:
WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)
Reply with quote

Patch must be correct!


Premature excitements are unjustified Smile






2016-08-03 15:38 GMT+03:00 Konstantin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
This patch can be wrong...


2016-08-03 13:07 GMT+03:00 Konstantin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi, Robert!


I've fixed a little encoding bug for OpenSceneGraph 3.4.0


std::fstream must be replaced by osgDB::fstream in src/osgDB/OutputStream.cpp.


OutputStream.cpp in attachment



KOS









------------------
Post generated by Mail2Forum
Back to top
Konstantin
Guest





PostPosted: Wed Aug 03, 2016 2:02 pm    Post subject:
WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)
Reply with quote

Bug appears in this situation:


1) Russian Windows (cp1251)

2) You have model with russian name (модель.FBX [== model.FBX] etc. )

3) myModel = osgDB::readNodeFile("модель.FBX");
4) osgDB::Registry::instance()->setOptions(new osgDB::Options("WriteImageHint=IncludeFile"));
5) osgDB::writeNodeFile(myModel, "out.osgb")


out.osgb will be without textures (black in scene) because they can't be loaded from модель.fbm directory.




std::fstream -> osgDB::fstream will fix it.


Excitements about "This patch can be wrong..." are unjustified Smile




KOS



2016-08-03 16:33 GMT+03:00 Konstantin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Patch must be correct!


Premature excitements are unjustified Smile






2016-08-03 15:38 GMT+03:00 Konstantin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
This patch can be wrong...


2016-08-03 13:07 GMT+03:00 Konstantin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi, Robert!


I've fixed a little encoding bug for OpenSceneGraph 3.4.0


std::fstream must be replaced by osgDB::fstream in src/osgDB/OutputStream.cpp.


OutputStream.cpp in attachment



KOS














------------------
Post generated by Mail2Forum
Back to top
ravidavi
User


Joined: 06 Nov 2015
Posts: 34

PostPosted: Wed Aug 03, 2016 7:39 pm    Post subject:
Re: WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)
Reply with quote

Konstantin wrote:


Premature excitements are unjustified Smile



My wife told me the same thing once. Shocked



Sorry, couldn't be helped.
Back to top
View user's profile Send private message
Raizel
User


Joined: 02 Jan 2016
Posts: 58

PostPosted: Wed Aug 03, 2016 8:41 pm    Post subject:
Reply with quote

Здравствуйте, Константин.

Не знаю, что и сказать...

В принципе, с именами файлов на русском, естественно, должны быть проблемы, т.к. у нас либо const char* либо std::string.
Лично я, как человек, который занимается программированием, не
позволяю себе русских имён в файлах. Поэтому, для Роберта эта тема не понятна, я думаю.
Back to top
View user's profile Send private message
Konstantin
Guest





PostPosted: Thu Aug 04, 2016 8:26 am    Post subject:
WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)
Reply with quote

Nikolai!
Programmers "sometimes" write applications for end user, who can choose any filename or filepath of the model hi wants (if OS support it)
Konstantin S. Matveyev
3 авг. 2016 г. 11:41 PM пользователь "Nickolai Medvedev" < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> написал:
Quote:

Здравствуйте, Константин.

Не знаю, что и сказать...

В принципе, с именами файлов на русском, естественно, должны быть проблемы, т.к. у нас либо const char* либо std::string.
Лично я, как человек, который занимается программированием, не
позволяю себе русских имён в файлах. Поэтому, Роберту эта тема не понятна, я думаю.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68272#68272





_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10982

PostPosted: Wed Aug 10, 2016 12:38 pm    Post subject:
WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)
Reply with quote

Hi Konstantin,

I have merged the change from std:: to osgDB::fstream with git master.

Thanks,
Robert.

On 3 August 2016 at 11:07, Konstantin <> wrote:
Quote:
Hi, Robert!

I've fixed a little encoding bug for OpenSceneGraph 3.4.0

std::fstream must be replaced by osgDB::fstream in
src/osgDB/OutputStream.cpp.

OutputStream.cpp in attachment


KOS






------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Konstantin
Guest





PostPosted: Wed Aug 10, 2016 3:13 pm    Post subject:
WriteImageHint=IncludeFile encoding fix (std::fstream -> osgDB::fstream)
Reply with quote

Robert, thanx Smile

2016-08-10 15:37 GMT+03:00 Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi Konstantin,

I have merged the change from std:: to osgDB::fstream with git master.

Thanks,
Robert.

On 3 August 2016 at 11:07, Konstantin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi, Robert!

I've fixed a little encoding bug for OpenSceneGraph 3.4.0

std::fstream must be replaced by osgDB::fstream in
src/osgDB/OutputStream.cpp.

OutputStream.cpp in attachment


KOS




Quote:
_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org




------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts PHYSFS / VFS - How to make a custom o... Steal General 4 Mon Jul 10, 2017 1:28 pm View latest post
No new posts PHYSFS / VFS - How to make a custom o... Steal General 0 Mon Jul 10, 2017 1:18 pm View latest post
No new posts Error with osgDB::readRefNodeFiles[So... robertosfield General 3 Tue Oct 04, 2016 11:15 am View latest post
No new posts slow speed of osgDB::writeImageFile()... cbuchner1 General 0 Mon Sep 12, 2016 9:09 am View latest post
No new posts Potential fix for osgDB MSVC linkage ... James Turner General 12 Sun Aug 07, 2016 1:01 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP