Visual Studio 2013 Preview - isprint() incorrectly classifies '\t' as printable for "C" locale.

| 2 Comments
It seems that isprint() is broken.

The following program demonstrates the problem.

In VS20013 it prints "test failed" in all previous versions of visual studio it prints "test passed".

From this reference: http://en.cppreference.com/w/cpp/string/byte/isprint it seems that VS2013 is broken.


#include <ctype.h>

#include <iostream>

int main()
{
   int c = 9;

   if (isprint(c))
   {
     std::cout << "test failed" << std::endl;
   }
   else
   {
     std::cout << "test passed" << std::endl;
   }

   return 1;
}

2 Comments

This issue has been fixed for VS 2013 RTM.

Confirmed fixed with VS 2013 RTM... Just tested it.

Leave a comment